Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error log -- Timeout while waiting for a publish to ThingsBoard! #1353

Open
volpima opened this issue Mar 25, 2024 · 6 comments
Open
Assignees
Labels

Comments

@volpima
Copy link

volpima commented Mar 25, 2024

Hello!
I'm experiencing an issue with communication between my Raspberry Pi 3B+, which is running the Thingsboard IoT Gateway service version 3.4.5 over Ubuntu Server 22.04 LTS, and the Thingsboard platform running 3.6.2 version.
I'm receiving a series of logs on the Raspberry Pi (Iot Gateway), such as "Mar 25 09:08:21 ubuntu python3[2968]: 2024-03-25 09:08:21 - |ERROR| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 687 - Timeout while waiting for a publish to ThingsBoard!" as seen in the screenshot. What could be the cause?
The strange thing is that on the cloud platform, I see IoT Gateway as active, so the publish data is probably failing on a topic for communicating some parameters of the smart device. Do you have any suggestions?

image

Copy link

Hi @volpima.
Thank you for your interest in ThingsBoard IoT Gateway.
Your issue was registered, please wait for response from engineer.

IOTGW-190

@imbeacon
Copy link
Member

Hi @volpima,

This issue relates to some modification of data sending, please try to use the latest version.

@volpima
Copy link
Author

volpima commented Mar 25, 2024

Hi @imbeacon thanks for your support.
Do you mean the 3.4.6 for IoT gateway?

Marco

@imbeacon
Copy link
Member

Yes, unfortunately it sill be can unstable, we are working now with rate limits per each device created through the gateway, but it is more stable than 3.4.5

@volpima
Copy link
Author

volpima commented Apr 16, 2024

Hi @imbeacon any news regarding this issue? Unfortunately, this solution is really unstable; the problem reoccurs every few hours, and the MQTT communication between the IoT Gateway and Thingsboard Community Edition is interrupted, preventing the transmission of data from the Modbus source.
Do you have any suggestion?

I noticed this error before the disconnection. Is there a way to automatically restart the service if an error occurs?

Apr 15 17:46:06 ubuntu python3[947]: Exception in thread Sending thread: Apr 15 17:46:06 ubuntu python3[947]: Traceback (most recent call last): Apr 15 17:46:06 ubuntu python3[947]: File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Apr 15 17:46:06 ubuntu python3[947]: self.run() Apr 15 17:46:06 ubuntu python3[947]: File "/usr/lib/python3.10/threading.py", line 953, in run Apr 15 17:46:06 ubuntu python3[947]: self._target(*self._args, **self._kwargs) Apr 15 17:46:06 ubuntu python3[947]: File "/var/lib/thingsboard_gateway/.local/lib/python3.10/site-packages/tb_device_mqtt.py", line 624, in __sending_thread_main Apr 15 17:46:06 ubuntu python3[947]: self._on_connect(self._client, None, None, 0) Apr 15 17:46:06 ubuntu python3[947]: File "/var/lib/thingsboard_gateway/.local/lib/python3.10/site-packages/tb_gateway_mqtt.py", line 54, in _on_connect Apr 15 17:46:06 ubuntu python3[947]: gateway_attributes_topic_sub_id = int(self._client.subscribe(GATEWAY_ATTRIBUTES_TOPIC, qos=1)[1]) Apr 15 17:46:06 ubuntu python3[947]: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

@samson0v
Copy link
Contributor

samson0v commented Jun 3, 2024

Hi @volpima,
Try to use the version from the master branch and let us know the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants