[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stop/Start happening simultaneously

From: Cyrus Mehta
Subject: Re: Stop/Start happening simultaneously
Date: Thu, 29 Mar 2007 17:49:10 -0400

Can I get away with:
      start = "sleep 60 && /mycompany/script/ schedserver
start "
or do I have to do the following:
      start = "bash -c 'sleep 60 && /mycompany/script/
schedserver start' "


Message: 2
Date: Thu, 29 Mar 2007 11:17:26 +0300
From: Aleksander <address@hidden>
Subject: Re: Stop/Start happening simultaneously
To: This is the general mailing list for monit
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

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
> 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

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/ 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]