Skip to content

[BUG] tb_device_mqtt stuck waiting for paho to process messages #1681

@tGallimberti-Kerberos

Description

@tGallimberti-Kerberos

Describe the bug
tb_device_mqtt stuck waiting for paho to process messages
Checking traffic logs seem that TB Edge PE some times can miss to reply with PUBACK and the message queue of paho start to grow after the limit of 5 packet.
After the 600 seconds default timeout the tb_client retry to publish messages to paho and the situation stay stucked.

If the situation persist for too long TB Edge send a disconnect request and IOT-Gateway do not try to reconnect giving this eroor:

2025-02-18 16:34:08.474 - |DEBUG| - [client.py] - client - _easy_log - 3258 - Sending PUBLISH (d0, q1, r0, m120), 'b'v1/gateway/telemetry'', properties=None, ... (85 bytes)      
2025-02-18 16:34:08.478 - |ERROR| - [tb_device_mqtt.py] - tb_device_mqtt - get - 159 - Error while waiting for publish: Message publish failed: The client is not currently connected.

Image

The IOT-Gateway have IP 192.168.0.80, the TB Edge PE have IP 192.168.0.158
the screen was taken from Wireshark with the folowing filter

(ip.addr == 192.168.0.158 || ip.addr == 192.168.0.80) && mqtt

Error traceback (If available):

2025-02-18 16:30:13.454 - |DEBUG| - [tb_device_mqtt.py] - tb_device_mqtt - _wait_until_current_queued_messages_processed - 803 - Waiting for messages to be processed by paho client, current queue size - 12, max inflight messages: 5
2025-02-18 16:30:13.455 - |DEBUG| - [tb_device_mqtt.py] - tb_device_mqtt - _wait_until_current_queued_messages_processed - 803 - Waiting for messages to be processed by paho client, current queue size - 12, max inflight messages: 5
2025-02-18 16:30:13.455 - |DEBUG| - [tb_device_mqtt.py] - tb_device_mqtt - _wait_until_current_queued_messages_processed - 803 - Waiting for messages to be processed by paho client, current queue size - 12, max inflight messages: 5

Versions (please complete the following information):

  • OS: Windows 10 Pro 19045.5487
  • Thingsboard IoT Gateway version 3.7.0
  • Python version 3.12.4

Metadata

Metadata

Labels

bugcan be closedLabel uses when issue is fixed or feature is added and will be available in the next release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions