eclipse / paho.mqtt.python

paho.mqtt.python
Other
2.14k stars 724 forks source link

sslv3_alert_bad_record_mac #722

Open yangxiang12 opened 1 year ago

yangxiang12 commented 1 year ago

How should this problem be solved?

python version: 3.6.9 sslerror: [ssl: sslv3_alert_bad_record_mac] sslv3 alert bad record mac (_ssl.c:2309)

` client.tls_set( ca_certs="xxx.crt", certfile="xxx.pem", keyfile="xxx.key", cert_reqs=ssl.CERT_NONE, tls_version=ssl.PROTOCOL_TLSv1_2 )

client.reconnect_delay_set(min_delay=5, max_delay=5) client.connect_async(host=self.host, port=self.port, keepalive=10) client.loop_start() `

yangxiang12 commented 1 year ago

Exception in thread Thread-2842003: Traceback (most recent call last): File "threading.py", line 916, in _bootstrap_inner File "threading.py", line 864, in run File "paho/mqtt/client.py", line 3591, in _thread_main File "paho/mqtt/client.py", line 1756, in loop_forever File "paho/mqtt/client.py", line 1164, in _loop File "paho/mqtt/client.py", line 1556, in loop_read File "paho/mqtt/client.py", line 2370, in _packet_read File "paho/mqtt/client.py", line 640, in _sock_recv File "ssl.py", line 997, in recv File "ssl.py", line 874, in read File "ssl.py", line 633, in read ssl.SSLError: [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:2309)

MattBrittan commented 6 months ago

Apologies for the long delay in responding.

Sorry - we would need more information (i.e. what broker, broker setup/log, output of openssl s_client -connect servername:port etc). If you have solved this yourself in the interim please close the issue.