|
From: | Leif Gustafson |
Subject: | RE: Potential monit race condition in restart |
Date: | Mon, 17 Jun 2013 09:06:47 -0800 |
The same symptoms occur with a lot of services on RHEL at least. sshd is another one that loses its pid file when using monit via stop/start even though the service is running correctly. Instead of stop/start you could potentially use an execute action on failure and run /etc/init.d/httpd restart. It is a very frustrating problem… From: address@hidden [mailto:address@hidden On Behalf Of Stoflet, Darryl M Hi, On RHEL6 apache the stop command to /etc/init.d/httpd pauses (by default 10s) to ensure the httpd processes are killed before actually deleting the pid file. When invoking `monit restart httpd` I notice that monit calls the stop command immediately followed by the start command (which is cfg for /etc/init.d/httpd <cmd>). Apache is being restarted however monit thinks it has failed since the pid file is missing. I believe this is because of /etc/init.d/httod stop script, which is deleting the pid file of the httpd process after it has started but before the 10s pause has completed. Is there any way to configure the monit restart command to pause before calling start so that the stop command has time to complete? Regards, Darryl Stoflet |
[Prev in Thread] | Current Thread | [Next in Thread] |