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

On 17/10/2019 17:19, Dustin Sallings wrote:
On Thu, Oct 17, 2019 at 9:11 AM Peter Rockett <p.rockett@xxxxxxxxxxxxxxx> wrote:

...snip

That said, I still cannot see the /var/run/mosquitto.pid file. This is a minor problem for me since my technique of running a round trip of MQTT messages is a far stronger test of whether the broker has broken(!) than merely checking if the pid file has been removed in an orderly termination by the OS.

I note Greg's comment below, but he is on BSD whereas I am on Linux Mint 19.2. Is anybody on the list running Mint 19.2 (Tina) or Ubuntu 18.04 (Bionic) and can see the /var/run/mosquiito.pid file with version 1.6.7?

My only wild speculation is that when the broker tries to open /var/run/mosquiito.pid it hits an 'access denied' error (why? no idea as surely the process should be running as system at that point?) and fails silently. But before I dive into the source code, it would be helpful if somebody could confirm that they see can this pid file on the same Linux distro.

If you have systemd, you should just ignore the concept of a PID file.  It's actually kind of hard to get a PID file working with a secure daemon since the daemon typically needs privileges to write the file that you don't want the daemon to have when it's running.

Luckily, the concept is obsolete, as is the whole concept of dropping privileges, daemonization, etc...  The OS can do the job of running processes and the application writers can just worry about doing what needs to be done with the smallest set of privileges required.

OK. As I said, I have a far more robust watchdog test that the broker is still functioning rather than merely occupying memory space. So I could - and probably will - quite happily drop the checking of the PID file. The fact remains, however, that the broker does not  behave in the way that the docs says it should... at least for me.

P.


_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/mosquitto-dev

Back to the top