-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 may fail to start on boot #2878
Comments
…#2878) Signed-off-by: Joachim Zobel <[email protected]>
From: Will exactly do the trick. After reboot mosquitto is running without error. |
Another option is the sysctl knob ip_nonlocal_bind. |
The same issue applies to Windows, if the IP-Address is not assigned when the mosquitto service starts. Tested using version 2.0.18a. |
I found a possible fix/workaround for Windows. |
I originally reported this to the debian bug tracker, see #1036450. Since the systemd configuration is maintained here I am now reporting it to upstream.
On my bullseye armhf Raspberry Pi the restart on reboot fails with "Cannot
assign requested address". The configuration causing this is fairly simple:
A later manual restart using
starts mosquitto correctly.
This does not happen reproducibly, but is quite serious. A power outage may bring down the whole home automation until manual intervention happens.
I have taken a closer look and found that the error is the same as with an an address that does not exist on the system. So reason is probably that the network interface with the external address is not yet up.
The easy solution would be for the service to wait for the network-online target. However the systemd documentation tells me that this is a questionable solution. It is however acceptable since mosquitto would not delay boot.
According to the above source IP_FREEBIND might be a better solution. This is however substantially harder to do.
Since this is a serious issue one of the above solutions should be implemented.
The text was updated successfully, but these errors were encountered: