monit-general
[Top][All Lists]
Advanced

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

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


From: Alexander Sviridov
Subject: Re: [monit] monit cannot start scripts: "failed to start"
Date: Tue, 15 Jun 2010 08:58:38 +0400


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

Hi,
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 summary.

$ 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 "/sites/mysite/shared/pids/ delayed_job.pid"

$ ps aux | grep `cat /sites/mysite/shared/pids/delayed_job.pid`
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?

Hello!
I'm setting up monit to watch on few Ruby scripts, and it cannot start
them:

Jun 11 20:54:29 monit[23514]: 'ar_sendmail' process is not running
Jun 11 20:54:29 monit[23514]: 'ar_sendmail' trying to restart
Jun 11 20:54:29 monit[23514]: 'ar_sendmail' start: /usr/local/bin/ ruby
Jun 11 20:54:59 monit[23514]: 'ar_sendmail' failed to start
Jun 11 20:54:59 monit[23514]: 'delayed_job' process is not running
Jun 11 20:54:59 monit[23514]: 'delayed_job' trying to restart
Jun 11 20:54:59 monit[23514]: 'delayed_job' start: /usr/bin/env
Jun 11 20:56:39 monit[23514]: 'delayed_job' failed to start

config file:

check process ar_sendmail with pidfile
"/sites/mysite/shared/log/ar_sendmail.pid"
start program = "/usr/local/bin/ruby /usr/local/bin/ar_sendmail -d -b
100 --max-age 0 --delay 60 -e production --chdir /sites/mysite/ current
start"
with timeout 30 seconds
stop program = "/usr/local/bin/ar_sendmail -e production --chdir
/sites/gamer.ru/current stop"
if 5 restarts within 5 cycles then alert

check process delayed_job with pidfile
"/sites/mysite/shared/pids/delayed_job.pid"
start program = "/usr/bin/env RAILS_ENV=production
/sites/mysite/current/script/delayed_job start"
with timeout 100 seconds
stop program = "/sites/mysite/current/script/delayed_job stop"
if 5 restarts within 5 cycles then alert


Is it possible to know why scripts failed to start? I like to see output...

Thank you!

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general


--
Salutations - Best regards - mit freundlichen Grüssen

----------------- address@hidden ------------------------------------ fr - Merci d'utiliser cette addresse pour le support ou question technique
en - Please use this address for any support or technical question
----------------- https://support.numlog.fr --------------------------------
fr - Privilégier la gestion de ticket d'incident  (Clients NUMLOG)
en - Prefere our trouble ticket application   (NUMLOG's customers)


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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