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

Starting mosquitto broker as Windows Service fails if interface doesn't yet exist on boot, ignores failure to open persistence file, etc. #3047

Open
pjkundert opened this issue May 2, 2024 · 0 comments

Comments

@pjkundert
Copy link

When starting as a Windows Service (on reboot, after "mosquitto install"), there are several issues that prevent it from starting, operating and stopping reliably.

  1. If a persistence_filepath cannot be opened -- the service simply ignores this failure and does not even log a warning or produce any other error message: it is considered a "success"!

*** This is a SERIOUS defect!! See line 431 of persist_read.c:

https://github.com/eclipse/mosquitto/blob/15292b20b0894ec7c5c3d47e4b22ee9d89f91132/src/persist_read.c#L431

  1. If the listen interface doesn't yet exist with the specified IP address (eg. a ZeroTier interface which has not yet come up), then the "mosquitto" Windows Service simply fails to start.

If a simple C:\mosquitto.log file is specified, the following error is produced:
Error: The requested address is not valid in its context.

However, if the target listen interface does exist, then it can appear and disappear as it wishes, and the mosquitto service continues to operate, reconnecting as necessary.

*** If an interface cannot be opened at start-time, it should be attempted later. As long as one interface is open, the service should start.

  1. On manually stopping the service, an "Error 1067: The process terminated unexpectedly" error pop-up is always displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant