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

Closed
volpima opened this issue Mar 25, 2024 · 8 comments
Closed
Assignees
Labels
bug can be closed If bug fixed or feature is implemented

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.

@volpima
Copy link
Author

volpima commented Jun 5, 2024

Hi @samson0v it seems to be stable! Thankyou! I'll inform you in case of other problems..thankyou!

@samson0v samson0v added the can be closed If bug fixed or feature is implemented label Jun 5, 2024
@imbeacon imbeacon closed this as completed Jun 5, 2024
@ravirajpspl2023
Copy link

hii i am new user in thinsboard gateway when internet is not available then , the connector is store locally . the connector is working as per time of keepalive after that connector aslo close its not working getting this error
2024-07-26T06:42:07.057094717Z 2024-07-26 06:42:07 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _on_disconnect - 343 - MQTT client was disconnected with reason code 16 (The keepalive time has been exceeded.)
2024-07-26T06:42:07.058525878Z 2024-07-26 06:42:07 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _on_disconnect - 343 - MQTT client was disconnected with reason code 16 (The keepalive time has been exceeded.)
2024-07-26T06:42:12.056256862Z 2024-07-26 06:42:12 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-07-26T06:42:22.063701335Z 2024-07-26 06:42:22 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!
2024-07-26T06:42:32.069493370Z 2024-07-26 06:42:32 - |WARNING| - [tb_device_mqtt.py] - tb_device_mqtt - _publish_data - 745 - Waiting for connection to be established before sending data to ThingsBoard!

i what to store data locally when internet is not available how to do this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug can be closed If bug fixed or feature is implemented
Projects
None yet
Development

No branches or pull requests

4 participants