Jump to content

SSL: BAD_LENGTH error message


johnnyt

Recommended Posts

Posted

I have 3 Airthings NS instances running (using different hubs/API tokens). At 19:28:59 Eastern time, one of the three reported this error:

2023-08-17 19:28:59,098 Thread-1076 udi_interface.interface ERROR    interface:send: MQTT Publish Error: [SSL: BAD_LENGTH] bad length (_ssl.c:2488)
Traceback (most recent call last):
  File "/var/polyglot/.local/lib/python3.9/site-packages/udi_interface/interface.py", line 632, in send
    self._mqttc.publish(topic, json.dumps(message), retain=False)
  File "/var/polyglot/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1257, in publish
    rc = self._send_publish(
  File "/var/polyglot/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2693, in _send_publish
    return self._packet_queue(PUBLISH, packet, mid, qos, info)
  File "/var/polyglot/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3016, in _packet_queue
    return self.loop_write()
  File "/var/polyglot/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1577, in loop_write
    rc = self._packet_write()
  File "/var/polyglot/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2464, in _packet_write
    write_length = self._sock_send(
  File "/var/polyglot/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 649, in _sock_send
    return self._sock.send(buf)
  File "/usr/local/lib/python3.9/ssl.py", line 1174, in send
    return self._sslobj.write(data)
ssl.SSLError: [SSL: BAD_LENGTH] bad length (_ssl.c:2488)
2023-08-17 19:28:59,099 MQTT       udi_interface.interface INFO     interface:_disconnect: MQTT Unexpected disconnection. Trying to reconnect in 10 seconds. rc: 7

The two other instances did not report this or any other any issues around that time.

Am on PG3 3.1.21 and IoX 5.6.4 on Polisy.

Posted

This problem is related to a communication error with the PG3 embedded MQTT server.

I recommend migrating to PG3x, this should fix this problem. PG3x uses Mosquitto MQTT server.

In addition, we no longer maintain PG3.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.4k
×
×
  • Create New...