[Top][All Lists]

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

Re: Possible cause of monit "action failed" messages...

From: Martin Pala
Subject: Re: Possible cause of monit "action failed" messages...
Date: Fri, 22 Jun 2012 15:48:07 +0200


please can you provide the monit log and you service configuration from monit configuration file?

Internally there is no race condition between the monit actions and the start/stop/restart/monitor/unmonitor are synchronized to prevent parallel execution of for example stop&start. If the action is requested via the CLI or web interface, it is protected until it completes and monit temporarily refuses to do other actions with that service.


On Jun 21, 2012, at 8:10 PM, Daniel Cook wrote:

We are seeing some error messages when we restart applications.
The error message we see is:
  monit: action failed -- Other action already in progress -- please try again later
To give a little context:
We don't use monit to start/stop the applications, but rather to monitor it and alert (and restart if needed), so the applications call monit monitor and unmonitor when starting and stopping the applications respectively. 
The applications can come and go (be installed/uninstalled) from the system so they each have a config file in /etc/monid.d directory.
So a typical application startup sequence would look like:
init_xxx start
  - verify the application is registered with monit using the "monit summary" command and then looking for the application in the output
  - start the application
  - tell monit to monitor the application using "monit monitor"
  - return status
The shutdown sequence would look like:
init_xxx stop
  - verify the application is registered with monit using the "monit summary"
  - tell monit to stop monitoring the application using the "monit unmonitor" command
  - stop the application
  - return status
On an application restart:
init_xxx restart the stop and start sequence is executed above.
I already know there is a "race" condition when monit is told to "register" the application and the time it actually shows up in the "summary" list, so our startup script waits to see the application appear in the "summary" output before saying the application is "registered".  
Is there a similar race condition between monitor and unmonitor?
We are using the monit-5.3.2-2.el6.rf.i686 rpm on CentOS 6.2
Dan Cook
To unsubscribe:

reply via email to

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