“Unable to connect (8)” error with Mosquitto client instead of full OpenSSL error.

Asked by Tristan

I have two servers with a very similar installation, one on Debian 8.7, the other on Debian 8.8.

On the first server, when I try to subscribe to a MQTT topic over SSL:

    mosquitto_sub -h localhost -t test -p 8883 --cafile /etc/mosquitto/certs/selfsigned.pem -d

I get this clear message which seems to come from OpenSSL (I already know the reason of the error, it is not the goal of my question) :

    Client mosqsub/9647-CIEYY2T7 sending CONNECT
    OpenSSL Error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
    Error: Protocol error

On the other server, for the exact same command, I get only this obscure message without the OpenSSL explanation:

    Unable to connect (8).

How can I get the full error message on the second server ?

P.S. : The clear error leads to replacing the certificate which makes the exchange work on both server, the question is only about getting clear error messages.

Question information

Language:
English Edit question
Status:
Solved
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Solved by:
Tristan
Solved:
Last query:
Last reply:
Revision history for this message
Roger Light (roger.light) said :
#1

The obvious difference here is likely to be the version of the mosquitto clients that is installed. If you use mosquitto_sub from the first server to connect to the second does it give you the full message?