> This is the only message
Sorry. Then I'm unable to reproduce this on the current Debian package.
Can you check this version?
> This is not the case, monit is not trying to restart the service, it
is entering a tight loop trying to read the PID file, as I stated.
Here is my steps to check this:
1) install Sid's version of the package
2) install openntpd + edit /etc/init.d/openntpd to exclude -p option
3) manually create (touch on start) and remove (on stop) empty pid file in
/etc/init.d/openntpd
4) include /etc/monit/monitrc.d/openntpd in /etc/monit/monitrc
5) restart openntpd
6) restart monit
After the last step:
$ cat /var/log/monit.log
[MSK Feb 21 23:13:49] info : monit HTTP server started
[MSK Feb 21 23:13:49] info : 'sid.test' Monit started
[MSK Feb 21 23:13:49] error : monit: Error reading pid from file
'/var/run/openntpd.pid'
[MSK Feb 21 23:13:49] error : 'ntpd' process is not running
[MSK Feb 21 23:13:49] info : 'ntpd' trying to restart
[MSK Feb 21 23:13:49] info : 'ntpd' stop: /etc/init.d/openntpd
[MSK Feb 21 23:13:49] error : monit: Error reading pid from file
'/var/run/openntpd.pid'
[...]
[MSK Feb 21 23:13:49] info : 'ntpd' start: /etc/init.d/openntpd
[MSK Feb 21 23:13:49] error : monit: Error reading pid from file
'/var/run/openntpd.pid'
[...]
[MSK Feb 21 23:14:19] error : 'ntpd' failed to start
[MSK Feb 21 23:16:19] error : monit: Error reading pid from file
'/var/run/openntpd.pid'
[MSK Feb 21 23:16:19] error : 'ntpd' process is not running
[MSK Feb 21 23:16:19] info : 'ntpd' trying to restart
[MSK Feb 21 23:16:19] info : 'ntpd' stop: /etc/init.d/openntpd
[MSK Feb 21 23:16:19] error : monit: Error reading pid from file
'/var/run/openntpd.pid'
[MSK Feb 21 23:16:19] info : 'ntpd' stopped
[MSK Feb 21 23:16:19] info : 'ntpd' start: /etc/init.d/openntpd
[MSK Feb 21 23:16:20] error : monit: Error reading pid from file
'/var/run/openntpd.pid'
[...]
[MSK Feb 21 23:19:21] error : monit: Error reading pid from file
'/var/run/openntpd.pid'
[MSK Feb 21 23:19:21] error : 'ntpd' failed to start
[MSK Feb 21 23:21:21] error : 'ntpd' service restarted 4 times within 4
cycles(s) - unmonitor
Yes, I see a lot of spam, but it works well for me.
> Monit should fail gracefully, handling an empty PID file the same way
it would handle a non-existent PID file.
That's very different situations, imho.
** Changed in: monit (Ubuntu)
Status: Confirmed => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1277655
Title:
Monit fills logs when reading 0 byte pid file
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/monit/+bug/1277655/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs