Error creating connection to Solace server using the solace-samples-jms

Options
bitsurfing
bitsurfing Member Posts: 1

Hello, I've been testing the "solace-samples-jms" from github using the "TopicSubscriber.java". I have had no problems on certain computers, but when run from another computer on the network I get errors. I have verified that this is not a firewall issue. I have tried other computers. The only thing I noticed is that the hostname in the ones that fail is long and gets cut off by in the error messages displayed.

I thought it was a bug with a fix, so I tried different version with the same error. Current dependencies:
com.solacesystems:sol-jms:10.8.1
javax.jms:javax.jms-api:2.0.1

Has anyone seen such behavior or error listed below?

Here is the error message, but with the hostnames anonymized:

INFO: Connecting to host 'orig=tcp://solace-server:55555, scheme=tcp://, host=solace-server, port=55555' (host 1 of 1, smfclient 1, attempt 1 of 1, this_host_attempt: 1 of 2)

May 07, 2020 3:05:07 PM com.solacesystems.jcsmp.protocol.impl.TcpClientChannel call
INFO: Connection attempt failed to host 'solace-server' ConnectException com.solacesystems.jcsmp.JCSMPTransportException: (Client name: long-client-host-that-is-cut-off/27792/#00110001/se2-ikGY6X Local port: -1 Remote addr: solace-server:55555) - Timeout happened when reading response from the router. cause: java.net.SocketTimeoutException ((Client name: long-client-host-that-is-cut-off/27792/#00110001/se2-ikGY6X Local port: -1 Remote addr: solace-server:55555) - )
May 07, 2020 3:05:10 PM com.solacesystems.jcsmp.protocol.impl.TcpClientChannel call
INFO: Connecting to host 'orig=tcp://solace-server:55555, scheme=tcp://, host=solace-server, port=55555' (host 1 of 1, smfclient 1, attempt 1 of 1, this_host_attempt: 2 of 2)
May 07, 2020 3:05:40 PM com.solacesystems.jcsmp.protocol.impl.TcpClientChannel call
INFO: Connection attempt failed to host 'solace-server' ConnectException com.solacesystems.jcsmp.JCSMPTransportException: (Client name: long-client-host-that-is-cut-off/27792/#00110001/se2-ikGY6X Local port: -1 Remote addr: solace-server:55555) - Timeout happened when reading response from the router. cause: java.net.SocketTimeoutException ((Client name: long-client-host-that-is-cut-off/27792/#00110001/se2-ikGY6X Local port: -1 Remote addr: solace-server:55555) - )
May 07, 2020 3:05:43 PM com.solacesystems.jcsmp.protocol.impl.TcpClientChannel close
INFO: Channel Closed (smfclient 1)
May 07, 2020 3:05:43 PM com.solacesystems.jcsmp.protocol.impl.TcpClientChannel close
INFO: Channel Closed (smfclient 1)
Caught: javax.jms.JMSException: Error creating connection - transport error ((Client name: long-client-host-that-is-cut-off/27792/#00110001/se2-ikGY6X Local port: -1 Remote addr: solace-server:55555) - Timeout happened when reading response from the router.)
javax.jms.JMSException: Error creating connection - transport error ((Client name: long-client-host-that-is-cut-off/27792/#00110001/se2-ikGY6X Local port: -1 Remote addr: solace-server:55555) - Timeout happened when reading response from the router.)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at com.solacesystems.jms.impl.JMSExceptionValue.newInstance(JMSExceptionValue.java:36)
at com.solacesystems.jms.impl.JCSMPExceptionMapper$ArrayListMapper.get(JCSMPExceptionMapper.java:32)
at com.solacesystems.jms.impl.JCSMPExceptionMapper.get(JCSMPExceptionMapper.java:95)
at com.solacesystems.jms.impl.Validator.createJMSException(Validator.java:582)
at com.solacesystems.jms.SolConnection.(SolConnection.java:157)
at com.solacesystems.jms.SolConnection.(SolConnection.java:86)
at com.solacesystems.jms.SolConnectionFactoryImpl.createConnection(SolConnectionFactoryImpl.java:112)
at SimpleSolaceConsumer.run(SimpleSolaceConsumer:35)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: com.solacesystems.jcsmp.JCSMPTransportException: (Client name: long-client-host-that-is-cut-off/27792/#00110001/se2-ikGY6X Local port: -1 Remote addr: solace-server:55555) - Timeout happened when reading response from the router.
at com.solacesystems.jcsmp.protocol.impl.TcpChannel.executePostOnce(TcpChannel.java:240)
at com.solacesystems.jcsmp.protocol.impl.ChannelOpStrategyClient.performOpen(ChannelOpStrategyClient.java:91)
at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.performOpenSingle(TcpClientChannel.java:399)
at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.access$800(TcpClientChannel.java:106)
at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel$ClientChannelConnect.call(TcpClientChannel.java:2412)
at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.open(TcpClientChannel.java:375)
at com.solacesystems.jcsmp.impl.JCSMPBasicSession.sniffRouter(JCSMPBasicSession.java:355)
at com.solacesystems.jcsmp.impl.JCSMPBasicSession.connect(JCSMPBasicSession.java:1192)
at com.solacesystems.jms.SolConnection.(SolConnection.java:138)
... 6 more
Caused by: java.net.SocketTimeoutException
at com.solacesystems.jcsmp.protocol.smf.SimpleSmfClient.open(SimpleSmfClient.java:880)
at com.solacesystems.jcsmp.protocol.smf.SimpleSmfClient.doPostNoResponse(SimpleSmfClient.java:309)
at com.solacesystems.jcsmp.protocol.smf.SimpleSmfClient.doPost(SimpleSmfClient.java:226)
at com.solacesystems.jcsmp.protocol.impl.TcpChannel.executePostOnce(TcpChannel.java:196)
... 14 more

Answers

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 541 admin
    Options

    Hi @bitsurfing ... the hostname that is truncated: is it the client name in the logs? That's what I'm inferring from your stacktrace above. If so, don't worry about it... the API will automatically generate a client name for the connection, using the current host... it's just a name and doesn't have anything to do with routing.

    So it just looks like a network connectivity issue to me. How have you verified there is no firewall issue? What happens if try to telnet to port 55555 on solace-server from your problem host? If good, it should connect and just sit there (and eventually close). I'm assuming you haven't configured any Connection ACLs or anything?