|
From: | Aleksander |
Subject: | Re: Stop/Start happening simultaneously |
Date: | Thu, 29 Mar 2007 11:17:26 +0300 |
User-agent: | Thunderbird 1.5.0.9 (X11/20070102) |
Cyrus Mehta wrote:
My problem is when restarting a particular service using the browser restart button (or cmd-line: monit -c ~/monit_master.cfg restart schedserver), the stop function goes off, followed almost simultaneously by the start function. I validated this by doing a constant 'ps -ef | grep' for both the stop and start processes before restarting, and the start script happens almost seconds after the stop script, which ultimately causes restarts to fail, since stop and start are happening simultaneously.
I've had that problem too. Haven't got around to fixing it yet though.
I even tried putting a "sleep 60" at one point, but to no effect stop = "/mycompany/script/runService.sh schedserver stop ; sleep 60"
I'd use a && instead of a semicolon. Also, if you suspect that "start" is done too early without waiting for stop to finish, it would make more sense to put sleep in front of the start script, not behind the stop script. Just some ideas.
A custom restart definition would be a good addition to monit. HTH, Alex
[Prev in Thread] | Current Thread | [Next in Thread] |