Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Changes in latest version breaks watchdog

Peter Rockett <p.rockett@xxxxxxxxxxxxxxx> writes:

> I have had the mosquitto broker running under Linux Mint 19 with a
> watchdog daemon without problems for several months. I have just
> upgraded to the latest version of mosquitto and immediately got into a
> cycle of perpetual reboots.

You did not explain the versions you updated from and to.

> The first issue I have run down is that mosquitto no longer seems to
> produce a /var/run/mosquitto.pid file, which I thought was pretty
> standard for daemons. My watchdog was testing for the existence of
> this pid file to check that the broker had not terminated. So Question
> 1: Has the generation of /var/run/mosquitto.pid been removed from the
> latest version? If so, why? If not, any ideas why I am not seeing it?

It is pretty standard, but I hear that some people like systemd which
does things differently, or some other init system.  The pid file can be
configured in the config file.

You also didn't explain how you merged the config file changes between
releases, and if you have diffed your old config file from the old
sample, and the new config file from the new sample, and studied the
content of the diffs and the changes between them.

> Question 2: Have there been any other changes? (The change log seems
> to show only benign bug fixes.) Even when I stop my watchdog checking
> for the existence of (a non-existent) /var/run/mosquitto.pid file, I
> am still getting unexpected restarts. My setup is that my watchdog
> periodically runs an executable that writes via the broker to a
> service program that then responds with a message back to the first
> executable; all MQTT messages use libmosquitto. If the round trip
> works properly then I can infer that all is well; otherwise my testing
> program returns an error code to the watchdog that then forces a
> restart. On digging a little deeper, the service at the end of the
> chain that responds is now unable to connect to the new version of the
> broker. Again, this has all worked perfectly for several months but
> now appears to have broken on the new version of mosquitto. Any ideas?
> Do I need to reset the passwords when I upgrade?


This is really a question for your distribution; mosuqitto doens't
control how the config files are changed during an upgrade process.

I suggest making conenctions by hand with mosquitto_{pub,sub} and
watching the logs, and then doing it with your watchdog programs.
Debugging a newly-arrived problem is really the same process as getting
in going in the first place, except you are looking for a change you
didn't expect instead of a mistake you didn't realize you made (or bad
docs that told you to configure something wrong) :-)


Back to the top