monit-general
[Top][All Lists]
Advanced

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

monit claims the program failed to restart even though it restarted ok


From: Tony Miller
Subject: monit claims the program failed to restart even though it restarted ok
Date: Mon, 27 Feb 2012 15:26:56 -0800

I use monit to start and stop a script, and I'm just a little confused because monit seems to say that it has failed with `monit status`.

address@hidden ~]# monit status
The Monit daemon 5.3.2 uptime: 2h 21m 

Process 'delayed_job'
  status                            Execution failed
  monitoring status                 Monitored
  data collected                    Mon, 27 Feb 2012 15:22:47


I am starting a script in my rails application called delayed_job. I source this file in my monitrc:

check process delayed_job                                                                                                             
  with pidfile /var/www/myapp/shared/pids/delayed_job.pid                                 
  start program = "/bin/bash -l -c '/usr/bin/env RAILS_ENV=production /var/www/myapp/current/script/delayed_job start'"                                                                                                         
  stop program = "/bin/bash -l -c '/usr/bin/env RAILS_ENV=production /var/www/myapp/current/script/delayed_job stop'"                                                                                                           

I have to do the '/bin/bash -l -c' stuff because I use a program called RVM which sets the current version of Ruby to use, which is set up in a script in /etc/profile.d/. 

I'm just a little confused, it looks like monit is saying that it failed? However it *is* running, I can see the process in top and it is working fine.

Thanks,
-Tony

reply via email to

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