Could not read valid SMF Header from network.
Closed this issue · 2 comments
Hi
I've been trying to deploy Solace to OpenShift using Helm and exposing the services through routes.
When I try to establish a connection to Solace using the Solace JMS client I get an exception:
java.io.IOException: Could not read valid SMF Header from network. found smf version=0
When I check the pod log in OpenShift it looks like it hasn't received any traffic outside of SEMP requests.
I'm using Minishift with VirtualBox. I installed Helm and Tiller by simply following the Helm docs. I manually configured my project using the commands in the bottom of the prepareProject.sh script in this repository:
oc policy add-role-to-user edit system:serviceaccount:myproject:default
oc adm policy add-scc-to-user privileged system:serviceaccount:myproject:default
oc adm policy add-scc-to-user anyuid system:serviceaccount:myproject:default
oc adm policy add-cluster-role-to-user storage-admin admin
Then I setup the Helm chart using the configure.sh script from the solace-kubernetes-quickstart repository. I had to remove the podModRbac.yaml template though because I got an error message from OpenShift saying something along the lines of that the system:serviceaccount:myproject:default SA is not allowed to create roles at the cluster level and I don't know how to get around that.
I exposed the services through routes manually in the OpenShift console since I want to be able to connect from my IDE. One route for the solace-discovery service (port 8080) and one for the solace service (port 55555). I'm able to reach the Solace GUI through the solace-discovery route and I'm able to create queues by calling the SEMP API through curl.
Other than that I've used all the stuff provided in this and the corresponding kubernetes repo to it's absolute basics (by skipping optional stuff and utilizing default values as much as possible). I've used the latest versions for everything afaik.
I'm retrieving the Solace JMS client through the following Maven dependency:
<dependency>
<groupId>com.solacesystems</groupId>
<artifactId>sol-jms</artifactId>
<version>10.2.1</version>
</dependency>
Here is some log output from my Spring Boot app that could be helpful:
2018-09-26 17:11:28.246 INFO 5007 --- [ main] c.s.j.protocol.impl.TcpClientChannel : Connecting to host 'orig=tcp://foo-solace-myproject.<obfuscated-ip>.nip.io:80, scheme=tcp://, host=foo-solace-myproject.<obfuscated-ip>.nip.io, port=80' (host 1 of 1, smfclient 2, attempt 1 of 1, this_host_attempt: 1 of 1)
2018-09-26 17:11:28.275 INFO 5007 --- [ main] c.s.j.protocol.impl.TcpClientChannel : Connection attempt failed to host 'foo-solace-myproject.<obfuscated-ip>.nip.io' ConnectException com.solacesystems.jcsmp.JCSMPTransportException: (Client name: <obfuscated-name>.local/5007/#00110001 Local addr: <obfuscated-ip>:65060 Remote addr: foo-solace-myproject.<obfuscated-ip>.nip.io:80) - Error communicating with the router. cause: java.io.IOException: Could not read valid SMF Header from network. found smf version=0 ((Client name: <obfuscated-name>.local/5007/#00110001 Local addr: <obfuscated-ip>:65060 Remote addr: foo-solace-myproject.<obfuscated-ip>.nip.io:80) - )
2018-09-26 17:11:31.279 INFO 5007 --- [ main] c.s.j.protocol.impl.TcpClientChannel : Channel Closed (smfclient 2)
2018-09-26 17:11:34.294 INFO 5007 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : JMS message listener invoker needs to establish shared Connection
Br
Lucas
Closing this issue due to slow response.
Hi Lucas,
Sorry for the delayed response. I noticed you were using port 80, foo-solace-myproject..nip.io:80 to connect to the solace pubsub+ software. This is the default port for the SEMP service. The enterprise APIs and JMS API use port 55555 by default for messaging traffic. Can you try connecting using the SMF service port 55555?
Thank you,
Michael