@Rahul ,
Your log indicates that, from the broker side, the client did not finish the TLS handshake.
You can follow these troubleshooting instructions to diagnose and resolve the problem.
Step 1: Enable Verbose Output in HiveMQ
1.1. To gain insight into HiveMQ’s side of the connection establishment, you can utilize Java Virtual Machine (JVM) options.
1.2. Modify the startup instructions for HiveMQ by adding the following line to the variables
section in the run.sh
script (located at /opt/hivemq/bin/run.sh
):
JAVA_OPTS="$JAVA_OPTS -Djavax.net.debug=ssl,handshake"
1.3. Alternatively, for a temporary solution, you can directly add the option to $JAVA_OPTS
in the executing shell:
JAVA_OPTS="$JAVA_OPTS -Djavax.net.debug=ssl,handshake" ./bin/run.sh
Step 2: Use OpenSSL for Insight
2.1. The openssl
command line utility provides tools for working with SSL and can help you gain meaningful insight into the connection process.
2.2. One particularly useful tool for this purpose is s_client
, a minimal SSL client implementation. It’s ideal for examining the communication between an MQTT client and a broker during the connection process.
2.3. Use the following command to utilize s_client
and enable verbose output:
openssl s_client -connect ${hostname}:8883 -CAfile ca.cert.pem -key client-key.pem -cert client-cert.pem -debug
Replace ${hostname}
with the actual hostname of your node, and ensure the port (8883
in this case) matches your node’s configuration.
Please note that the above troubleshooting steps are designed to help you diagnose SSL secured connection issues in HiveMQ. Follow these instructions carefully, and make sure to replace placeholders with actual values from your environment. By enabling verbose output and utilizing OpenSSL’s s_client
, you’ll be able to gain insights into the connection process and pinpoint potential problems.
Best regards,
Dasha from HiveMQ Team