-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
[Request] Improve logging and handling of MQTT disconnect #136
Comments
Thank you for taking the time to investigate the issue! I've also made some tests, but I couldn't get the MQTT to timeout. The 2 minutes connection time is the default after some time, so it is normal to connect with a bit of a delay. I could add a log message when it loses connection which will make it more clear when this happens, but I don't know what else I could check for the issue you are having. |
Adding a log entry when connection is lost would be helpful as there is already a "Connection Accepted" log message, so a disconnect message would be appropriate.
Interesting.. that means the behaviour I have experienced is probably related to my environment. |
No activity on this issue recently. Make sure you update to the latest version of LNXlink to check if the issue has been resolved. |
No change since previous comment;
But also, no further occurrences of the issue that led me to log this request. |
Describe the solution you'd like
I have had 3 situations when the remote MQTT broker has been offline for a period and unfortunately I have not realised that the LnxLink instances have not reconnected when the broker is back up. To recover from this I have to log into each LnxLink endpoint and restart the service, because I have lost remote control and can't use LnxLink to fix things for me :)
I assume that the MQTT broker connection is reattempted, and that eventually LnxLink gives up. But I see no log entries to help understand what is happening.
I turned on debug logging and shut down my MQTT broker, here's the log output:
I shut down the MQTT broker at 19:52 and started it back up again at 20:10 (just over 17 minutes with no MQTT broker available). A few things of note:
How long/how many times is the MQTT connection attempted before giving up?
Can we get some log entries to indicate broker connection attempts, and broker connection loss?
Additional context
As a side note, I would like the log level setting to be in the config file rather than having to edit the service definition.
The text was updated successfully, but these errors were encountered: