Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SSL: BAD_LENGTH error message

Featured Replies

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.

That's a PG3 issue I've seen before. Will need @bmercier to look into it.

Sent from my Pixel 6 Pro using Tapatalk

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.