[Top][All Lists]

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

Re: [monit] monit cannot start scripts: "failed to start"

From: Eric Pailleau
Subject: Re: [monit] monit cannot start scripts: "failed to start"
Date: Tue, 15 Jun 2010 10:07:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100422 Mandriva/3.0.4-0.4mdv2009.1 (2009.1) Thunderbird/3.0.4

Please verify that this program returns (exit or fork).
if not monit will fail in timeout waiting for the program return code (0 = OK or 
<>0 = KO).

(simply launch it in a shell and see if it give you the prompt or not.)

if not you have to background it  directly (ending &) or wrapping it in a 
Note : A direct ending '&' make the timeout statement useless as it returns 
immediately. :>)

When using a pidfile monitoring, timeout is not very usefull while
it is in networking test  (icmp, http , etc...)

hope that can help another time.

Best regards.

Le 15/06/2010 06:58, Alexander Sviridov a écrit :

On 14.06.2010, at 12:06, Eric Pailleau wrote:

When launched, no environnement variables come with.
It is a very common issue in monit.

I guess monit autors may highlight this a bit more in documentation.

you have to load your env by doing a
program = "/bin/su - user -c '/usr/local/bin/ruby ... ' "

Hope that can help.

It did helped, thank you very much! Now monit starts my scripts.

However, there is a little problem still: I'm getting "Timeout" in monit

$ monit summary
The Monit daemon 5.1.1 uptime: 3d 11h 40m

Process 'delayed_job' Timeout

$ cat monitrc | grep pidfile
check process delayed_job with pidfile

$ ps aux | grep `cat /sites/mysite/shared/pids/`
25823 0.2 1.1 246668 141412 ? S 08:31 0:02 delayed_job
26953 0.0 0.0 7232 836 pts/1 R+ 08:51 0:00 grep 25823

What could cause such a behavior?

reply via email to

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