OpenShift TCPS routes

Hi @andan02,
I got a bit of info from our support team that might help:

What causes JCSMP to give this error: “cause: java.io.IOException: Could not read valid SMF Header from network.” when trying to connect? Something is wrong with the received packet and the JCSMP API cannot decode it. What is most likely happening is the openshift route is routing to the wrong host/port or something is corrupting the network data.

With this info I was actually able to reproduce the issue by pointing the sample at tcp://google.com:80 which makes me think that for some reason the smf traffic isn’t being properly routed through to port 55555.

MJD-MacBook-Pro.local:~/git/solace-samples-java-jcsmp/build/staged$ ./bin/DirectSubscriber tcp://google.com:80 default default
DirectSubscriber initializing...
--LOG-- 08:42:00.014 [main] INFO  com.solac.jcsmp.proto.impl.TcpClientChannel - Connecting to host 'orig=tcp://google.com:80, scheme=tcp://, host=google.com, port=80' (host 1 of 1, smfclient 1, attempt 1 of 1, this_host_attempt: 1 of 6)
--LOG-- 08:42:00.093 [main] INFO  com.solac.jcsmp.proto.impl.TcpClientChannel - Connection attempt failed to host 'google.com' ConnectException com.solacesystems.jcsmp.JCSMPTransportException: (Client name: MJD-MacBook-Pro.local/63808/#000f0001/aoVc2QtIeh   Local addr: 192.168.1.25 Local port: 62037   Remote addr: google.com  Remote port: 80) - Error communicating with the router. cause: java.io.IOException: Could not read valid SMF Header from network. found smf version=0 ((Client name: MJD-MacBook-Pro.local/63808/#000f0001/aoVc2QtIeh   Local addr: 192.168.1.25 Local port: 62037   Remote addr: google.com  Remote port: 80) - )

I can however help with this question:

I do not know how to monitor if a connection is taking place or not over tcp/tcps to the smf ports.
You can see if a client is connected a few ways…note that you likely won’t see your client since it is failing to connect.

  1. In PubSub+ Manager you can see connected SMF clients by choosing your Message VPN and then choosing the “Clients” Menu on the left hand side, and choosing “Solace Clients”
  2. In the logs use the show log event command to see the event log. This log will tell you when a client connects, if you look for events that say CLIENT: CLIENT_CLIENT_CONNECT that tells you when a messaging client is connecting to the broker. It will look something like this:
2021-05-03T18:37:37.780+00:00 <local3.info> b0e95afab69a event: CLIENT: CLIENT_CLIENT_CONNECT: default MJD-MacBook-Pro.local/16740/#000f0001/LOrqg4D3OS Client (4) MJD-MacBook-Pro.local/16740/#000
f0001/LOrqg4D3OS username default OriginalClientUsername(default) WebSessionId (N/A) connected to 172.17.0.2:55555 from 172.17.0.1:64534 version(10.10.0) platform(Mac OS X-x86_64 (Java 11.0.4+11)
 - JCSMP SDK) SslVersion() SslCipher() APIuser('marcdipasquale' Computer: 'MJD-MacBook-Pro.local' Process ID: 16740) authScheme(Basic) authorizationGroup() clientProfile(default) ACLProfile(defau
lt) SSLDowngradedToPlainText(No) SSLNegotiatedTo() SslRevocation(Not Checked), Capabilities(unbind-ack, bind-response-endpoint-error-id)

For next steps in troubleshooting this would there by some way of doing packet capture to see what is arriving into the load balancer on the outside of OpenShift vs. what is actually getting to the pod itself? Or even seeing stats within OpenShift that maybe tells us that the request is actually traversing the Load Balancer to the NodePort to the Pod?