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
Mosquitto 2.0.12 don't send LWT #2314
Comments
I can confirm on arm64, when I use the 2.0.12 docker image, one of my devices disconnects, and I never see the LWT published. When I revert back to eclipse-mosquitto:2.0.11 it works with no other changes that the version of the docker image Here is my use-case and my tests: I have a device which I want only to know if it's online or not (track if it has power) So when the client connects, it sets a LWT to a status topic saying "offline" and then publishes "online" to the same topic. So as long as the device is online, the status shows "online" and when the broker loses connection to it, the LWT will get published. When that client loses power, the LWT is executed approx 30 seconds later, and "offline" is published on the status topic. This works fine with 2.0.11 When I change 2.0.11 to 2.0.12, then when the client loses power, the LWT is never published, and the status topic still says "online". |
I cannot replicate this issue. Can you share the logs? maybe the config too? |
First I should say the problem may only exists on Windows 10 because a coworker tried it on Linux and is seems to work. Here is the config file and a part of logs for both versions: ///////////////////////// .conf ///////////////////////// ///////////////////////// 2.0.11 ///////////////////////// ///////////////////////// 2.0.12 ///////////////////////// |
Dears, I have to confirm this issue unfortunately. I'm running a Mosquitto broker under Debian Bullseye on a RasPi, binaries from Mosquitto Debian repository (for Buster). Most clients running Tasmota but also other clients that utilize mosquitto_pub are affected. Upon a new client connection to the broker, the LWT is recognized as such but when a client disconnects gracefully or unexpected, the LWT is not being replayed and the retained online message remains. Going back to 2.0.11 resolves this issue. BR, |
…et to true Closes #2314. Thanks to Marc Hamel.
Thanks very much for the details, it was helpful. It turns out it is the |
@ralight: Thanks a lot for your time and work and your help with this issue, very appreciated! |
Sorry for not having responded earlier, so much work to do. But many thanks for your reports and fix! Looking forward returning on the normal upgrade path with this fix! Have a good day. |
Thanks everyone |
With Mosquitto 2.0.12 (with Windows 10 64 bit), whe don't receive the Last Will & Testament (LWT) message when a client disconnect. With the same code for my clients, it works with version 2.0.11.
In verbose mode, with version 2.0.11 & 2.0.12, I see the client has set the LWT message (QoS=2) and when the client disconnects, both versions log the client connection closed but only version 2.0.11 log it sent the LWT.
The text was updated successfully, but these errors were encountered: