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: Eric Pailleau
Subject: Re: [monit] monit cannot start scripts: "failed to start"
Date: Mon, 14 Jun 2010 10:06:40 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100422 Mandriva/3.0.4-0.4mdv2009.1 (2009.1) Thunderbird/3.0.4

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.

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)




reply via email to

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