thingsboard-gateway icon indicating copy to clipboard operation
thingsboard-gateway copied to clipboard

[HELP] Message publish failed: The client is not currently connected.

Open DuXiaoChuang opened this issue 1 year ago • 4 comments

Describe the issue 2024-06-21 14:17:09 - |ERROR| - [tb_logger.py] - tb_logger - exception - 98 - Message publish failed: The client is not currently connected. Traceback (most recent call last): File "C:\thingsboard-gateway-master\thingsboard-gateway-master\thingsboard_gateway\gateway\tb_gateway_service.py", line 1205, in __read_data_from_storage else: File "C:\thingsboard-gateway-master\thingsboard-gateway-master\venv\Lib\site-packages\tb_device_mqtt.py", line 179, in get self.message_info.wait_for_publish(timeout=1) File "C:\thingsboard-gateway-master\thingsboard-gateway-master\venv\Lib\site-packages\paho\mqtt\client.py", line 362, in wait_for_publish raise RuntimeError('Message publish failed: %s' % (error_string(self.rc))) RuntimeError: Message publish failed: The client is not currently connected.

image

DuXiaoChuang avatar Jun 21 '24 06:06 DuXiaoChuang

Hi, please try to use a version from the master branch, I have added handling, for this error. It should resend failed message.

imbeacon avatar Jun 25 '24 05:06 imbeacon

Hi, please try to use a version from the master branch, I have added handling, for this error. It should resend failed message.

Hi, please try to use a version from the master branch, I have added handling, for this error. It should resend failed message.

Hello, can you tell me which code fixes this bug? Is this the picture below? image

DuXiaoChuang avatar Jun 25 '24 06:06 DuXiaoChuang

Yes, in this part of code we should handle all errors and just retry the message sending.

imbeacon avatar Jun 25 '24 06:06 imbeacon

Yes, in this part of code we should handle all errors and just retry the message sending.

Yes, in this part of code we should handle all errors and just retry the message sending.

Okay, let me pull the latest code and verify it. Thank you very much.

DuXiaoChuang avatar Jun 25 '24 06:06 DuXiaoChuang