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

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

Open
DuXiaoChuang opened this issue Jun 21, 2024 · 4 comments
Open
Assignees
Labels
bug can be closed If bug fixed or feature is implemented

Comments

@DuXiaoChuang
Copy link

DuXiaoChuang commented Jun 21, 2024

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

@imbeacon
Copy link
Member

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

@imbeacon imbeacon added can be closed If bug fixed or feature is implemented bug and removed help wanted labels Jun 25, 2024
@DuXiaoChuang
Copy link
Author

DuXiaoChuang commented Jun 25, 2024

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

@imbeacon
Copy link
Member

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

@DuXiaoChuang
Copy link
Author

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.

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

3 participants