The new rc.d script always thinks chronyd is not running (but does notice the PID file). $ service chronyd status chronyd is not running. $ service chronyd start Starting chronyd. Another chronyd may already be running (pid=30960), check /var/run/chronyd.pid /usr/local/etc/rc.d/chronyd: WARNING: failed to start chronyd $ ps auxw|grep chronyd chronyd 30960 0.0 0.0 15612 3256 - I 16:31 0:00.01 /usr/local/sbin/chronyd -f /usr/local/etc/chrony.conf root 30963 0.0 0.0 12060 2796 - I 16:31 0:00.00 /usr/local/sbin/chronyd -f /usr/local/etc/chrony.conf
Hi Peter, I cannot reproduce this with a default configuration, and the pidfile you get reported from chronyd appears nonstandard, both per chrony.conf as well as the port's default and sample files. The rc script uses /var/run/chrony/chronyd.pid, not /var/run/chronyd.pid. Please remove your pidfile directive, or change it to the default. Thank you.
...comment out, change or remove pidfile from /usr/local/etc/chrony.conf
(In reply to Matthias Andree from comment #2) Thanks, that fixed. The chrony.conf file has been like that forever - it was not a problem before, so maybe an UPDATING notice would be warranted? (Or at least a comment somewhere in the sample config.)
A commit references this bug: Author: mandree Date: Mon Apr 6 16:27:49 UTC 2020 New revision: 530887 URL: https://svnweb.freebsd.org/changeset/ports/530887 Log: net/chrony: fix regression, remove pidfile= from rc.d script chrony handles its own pidfile, and still our status method works, so avoid missing chrony's own lock management. PR: 245399 Reported by: Peter Putzer Changes: head/net/chrony/Makefile head/net/chrony/files/chronyd.in
Peter, thanks for the update, I think _1 should not have set pidfile= because that wasn't necessary and doesn't work in your situation. _2 removes that.
Inform Colin T. about the regression by way of adding a blocks on his BZ PR 244534.
I personally don't recommend changing the pidfile from the default. As chronyd won't be able to remove it on exit.