Solace broker connection issue : Channel is closed by peer
Hi,
I am currently trying to connect to a PubSub+ event broker (version=9.12.1.26) with TLS and client certificate authentication and I am facing an issue right after the TLS handshake:
I am using the following client library for my Java project :
<dependency> <groupId>com.solace.spring.boot</groupId>
<artifactId>solace-java-spring-boot-starter</artifactId>
<version>5.2.0</version>
</dependency>
And here is an extract of the configuration of my Java client app:
solace:
java:
host: tcps://yyyyyyy:yyyyy
apiProperties:
AUTHENTICATION_SCHEME: AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE
SSL_KEY_STORE: file:/path/to/file.p12
SSL_KEY_STORE_PASSWORD: password
SSL_KEY_STORE_FORMAT: PKCS12
You will find heareafter an extract of the logs for my client (logs were configured in verbose mode). Do you what could cause this interruption ?
As I said, just before the disconnection happens the TLS handshake seems to be successful and after that a login message is sent by the client lib (SimpleSmfClient::sendLoginRequestAwaitForResponse).
Thanks
==========================
c.s.jcsmp.protocol.smf.SimpleSmfClient : Client-1: waiting for Login response
io.netty.handler.ssl.SslHandler : [id: 0xfc91e15a, L:/xxx.xxx.xxx.xxx:xxxxx - R:yyyyyyy/yyy.yyy.yyy.yyy:yyyyy] HANDSHAKEN: protocol:TLSv1.2 cipher suite:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
c.s.j.protocol.impl.TcpClientChannel : Client-1: got netty event: NETTY_CHANNEL_INACTIVE with tag 1
c.s.jcsmp.protocol.smf.SimpleSmfClient : Client-1: responseQ enqueue object com.solacesystems.jcsmp.JCSMPTransportException: Channel is closed by peer
c.s.j.protocol.impl.TcpClientChannel : Client-1: got netty event: NETTY_CHANNEL_UNREGISTERED with tag 1
c.s.j.protocol.impl.TcpClientChannel : Client-1: Connection attempt failed to host 'yyyyyyy' ConnectException com.solacesystems.jcsmp.JCSMPTransportException: Channel is closed by peer ((Client name: xxxxx- local(/xxx.xxx.xxx.xxx:xxxxx) remote(yyyyyyy/yyy.yyy.yyy.yyy:yyyyy)) - )
c.s.j.protocol.impl.TcpClientChannel : Client-1: Channel Closed (smfclient 1)
c.s.jcsmp.protocol.smf.SimpleSmfClient : Client-1: local(/xxx.xxx.xxx.xxx:xxxxx) remote(yyyyyyy/yyy.yyy.yyy.yyy:yyyyy)(smfclient 1) Closing socket
Answers
-
Hi,
Finally I found what was happening. I was trying to connect to the AMQP TLS port but both solace-java-spring-boot-starter and solace-jms-spring-boot-starter seem to support only connection to the port corresponding to the SMF service.
That is why the pubsub broker ended the communication right after the beginning of the exchange (protocol mismatch).
0