Hi, the PID file path is set by “set pidfile” statement in monitrc. The default path is ~/.monit.pid. If your startup script (regardless of platform) expects specific path to pidfile, the monit configuration needs to be updated accordingly.
Regards, Martin > On 05 Aug 2015, at 06:08, Biju Nair (bijnair) <[email protected]> wrote: > > Hi there, > > I am using puppet to ensure monit 5.13 service is running on CentOS 7. I can > see the following errors when puppet tries to start monit. > > > Error: Could not start Service[monit]: Execution of '/bin/systemctl start > monit' returned 1: Job for monit.service failed. See 'systemctl status > monit.service' and 'journalctl -xn' for details. > > [root@ ~]# systemctl -l status monit.service > monit.service - SYSV: Monit is a utility for managing and monitoring > processes, > Loaded: loaded (/etc/rc.d/init.d/monit) > Active: failed (Result: timeout) since Tue 2015-08-04 03:48:57 UTC; 1min > 3s ago > Process: 18380 ExecStop=/etc/rc.d/init.d/monit stop (code=exited, > status=0/SUCCESS) > Process: 18509 ExecStart=/etc/rc.d/init.d/monit start (code=exited, > status=0/SUCCESS) > Main PID: 18204 (code=exited, status=0/SUCCESS) > > Aug 04 03:43:57 systemd[1]: Starting SYSV: Monit is a utility for managing > and monitoring processes,... > Aug 04 03:43:57 monit[18509]: Starting monit: Monit daemon with PID 19872 > awakened > Aug 04 03:43:57 monit[18509]: [ OK ] > Aug 04 03:43:57 systemd[1]: PID file /var/run/monit.pid not readable (yet?) > after start. > Aug 04 03:48:57 systemd[1]: monit.service operation timed out. Terminating. > Aug 04 03:48:57 systemd[1]: Failed to start SYSV: Monit is a utility for > managing and monitoring processes,. > > > Despite the above error I see that monit is up and running. Also, I observed > that monit creates the PID file in /run/monit.pid with the correct process ID > , but cribs saying /var/run/monit.pid file is not readable. I am using the > default configuration in the monitrc files $HOME/monit.pid . > > Also, after changing the monitrc file explicitly to use “/var/run/monit.pid” > monit starts successfully without any errors. > > Is this a known issue with monit on CentOS 7 ? This works perfectly with some > other flavours of linux that I use, e.g.: Redhat & Ubuntu. > > > Thanks & regards, > Biju > > -- > To unsubscribe: > https://lists.nongnu.org/mailman/listinfo/monit-general
-- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
