Hi,
First of all: I am using a Particle Electron and the current version (0.2.14) of the MQTT-TLS Library.
I am having problems getting a MQTT connection with TLS encryption stable. Without encryption it seems to work great. However, if I use TLS, I get SSL error messages from the broker at irregular intervals. I tested with two different brokers.
Here is a short excerpt from the log output:
Self-hosted VerneMQ:
2018-03-27 16:29:26.770 [error] <0.5251.6> SSL: {connection,{alert,2,20,{"ssl_cipher.erl",300},decryption_failed}}: ssl_connection.erl:861:Fatal error: unexpected message
2018-03-27 16:33:45.735 [error] <0.5477.6> SSL: {connection,{alert,2,20,{"ssl_cipher.erl",300},decryption_failed}}: ssl_connection.erl:861:Fatal error: unexpected message
Mosquitto as cloud service:
2018-03-27 17:02:16: OpenSSL Error: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac
2018-03-27 17:19:14: OpenSSL Error: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac
After these error messages, the broker breaks the connection and the set keepalive starts to run. Then the last will is sent.
In addition, I also noticed that strange characters land on the broker. So unreadable characters in both the topic and in the message. I’m not sure if they came via the SSL or non-SSL port.
Are there any ideas what go wrong here?
Thanks a lot!