MQTT constantly disconnecting and reconnecting. MQTT logs show timeout being exceeded #1660
-
I recently started work on migrating my Home Assistant instance from a HASS OS VM on my homelab VM host to docker containers on a dedicated server. As part of this, I'm moving from the Mosquitto broker add-on to a new Mosquitto docker instance. I have 2 Dreame Z10 Pro vacuums that have been working flawlessly for over a year, but when I enter the info for the new broker, MQTT is dropping and reconnecting constantly. I left both vacuums conencted to the new broker for a few days to see if I could detect a pattern, and it looks like they'll stay connected for 90 seconds, then disconnect and stay that way for about 2 minutes and then reconnect. I've set the broker to allow anonymous connections while troubleshooting to see if that was the issue, but no change. In the Mosquitto logs, I see the following lines:
So the keep-alive is set, but I never see PINGREQ/PINGRESP from the vacuums like I am from other devices that are on the broker, and this tracks with the 90 second online time. The logs from the vacuum are as follows:
It doesn't seem to be the connection issues that other users have seen relating to network problems, and I have multiple other devices that are using this broker with no issues, so it doesn't seem to be a misconfiguration there. I have tried putting the vacuums back on the old broker and they stay connected there no problem. Any help with this would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'm still trying to figure out what the issue is on this. I tried running Mosquitto directly on the Debian host thinking that would remove any potential issues introduced by using Docker, but am still seeing the exact same behavior with these lines appearing repeatedly in the Mosquitto log file:
Again, this behavior is happening with 2 vacuums. |
Beta Was this translation helpful? Give feedback.
-
I got around this issue by spinning up a new Mosquitto instance on another Docker host with the exact same config, moving the vacuums to that broker for testing, and then moving them back to the broker referenced here again. No idea why that would fix the issue, but there you go. |
Beta Was this translation helpful? Give feedback.
I got around this issue by spinning up a new Mosquitto instance on another Docker host with the exact same config, moving the vacuums to that broker for testing, and then moving them back to the broker referenced here again. No idea why that would fix the issue, but there you go.