Description of problem: Update of systemd changed behavior so when SYSVINIT script for monit runs, systemd looks for /var/run/monit to determine whether daemon actually started. As shipped, monit creates /var/run/monit.pid, so systemd never recognizes startup of daemon. This results in long hang during boot and error messages during manual attempts to restart monit. Changing init script to create the proper pidfile corrects the problem. pidfile is passed on command line of monit daemon program. Version-Release number of selected component (if applicable): systemd-37-11 monit-5.2.5-2 How reproducible: Every time Steps to Reproduce: 1. Upgrade system to levels described 2. Configure monit to start on boot with default options 3. Restart system or start monit manually Actual results: System/command hangs, finally reports: Jan 31 16:24:18 raptor systemd[1]: monit.service operation timed out. Terminating. Jan 31 16:24:18 raptor systemd[1]: Unit monit.service entered failed state. Jan 31 16:33:23 raptor monit[1717]: Starting monit: Jan 31 16:33:23 raptor systemd[1]: PID file /var/run/monit not readable (yet?) after start. Jan 31 16:38:23 raptor systemd[1]: monit.service operation timed out. Terminating. Jan 31 16:38:23 raptor systemd[1]: Unit monit.service entered failed state. At this point monit daemon is running properly, but systemd does not recognize it. Expected results: Daemon starts and systemctl/service command returns normally. Additional info:
I'm seeing something similar with portsentry, which doesn't create a pid file: Jan 29 06:31:02 gwladys systemd[1]: Failed to read PID file /var/run/portsentry.pid after start. The service might be broken. At this point portsentry is running normally. portsentry has a sysv init script /etc/init.d/portsentry This is with systemd-37-11. Reverting to systemd-37-3 makes everything work as expected.
monit-5.2.5-3.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/monit-5.2.5-3.fc16
I rebuilt the monit RPM for F16. The problem was that systemd now reads the SysV init script and looks for a pidfile keyword. If that is found, it reads the name of the PID file from there. We have had /var/run/monit in there for ages. I changed that line to /var/run/monit.pid and it runs fine now on my system. I uploaded the update to Bodhi already (see above). Maybe you guys can test it and give it some karma so it flows through Bodhi a bit faster :) Thanks for reporting this bug.
The portsentry init.d file contained: # pidfile: /var/run/portsentry.pid Removing this fixes the problem for me.
Provided update to monit corrects problem. Thanks!
Package monit-5.2.5-3.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing monit-5.2.5-3.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-1110/monit-5.2.5-3.fc16 then log in and leave karma (feedback).
monit-5.2.5-3.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.