I previously had Monit monitoring resque with the following Monit script
check process resque_worker_production_QUEUE
with pidfile /var/tmp/resque_production.pid
start program = "/usr/bin/env HOME=/home/eg RACK_ENV=production PATH=/usr/local/bin:/usr/local/ruby/bin:/usr/bin:/bin:$PATH /bin/sh -l -c 'cd /apps/eg/production/current; nohup bundle exec rake environment resque:work RAILS_ENV=production QUEUE=mailer VERBOSE=1 PIDFILE=/var/tmp/resque_production.pid & >> log/resque_worker_production_QUEUE.log 2>&1'" as uid eg and gid eg
stop program = "/bin/sh -c 'cd /apps/eg/production/current && kill -9 $(cat
Then I changed some things around, most notably removing the system-wide rvm install and I'm assuming a ruby install at /usr/local/ruby/bin . Around this time monit could no longer start resque. Maybe the cause was something else but I'm thinking it was these uninstalls that caused the breakage.
So I looked throught the script and noticed that /usr/local/ruby/bin doesn't exist, so I tried changing it to what I think it should point to now that the ruby in my rvm is the only one around /home/eg/.rvm/rubies/ruby-1.9.3-p194/bin
But that didn't work. So I google some more and found this suggestion which also didn't work:
check process resque_worker_production_QUEUE
with pidfile /var/tmp/resque_production.pid
start program = "/bin/bash -l -c 'cd /apps/eg/production/current; nohup bundle exec rake environment resque:work RAILS_ENV=production QUEUE=mailer VERBOSE=1 PIDFILE=/var/tmp/resque_production.pid & >> log/resque_worker_production_QUEUE.log 2>&1'" as uid eg and gid eg
All I get in the log is:
[UTC Oct 5 03:06:38] error : 'resque_worker_production_QUEUE' process is not running
[UTC Oct 5 03:06:38] info : 'resque_worker_production_QUEUE' trying to restart
[UTC Oct 5 03:06:38] info : 'resque_worker_production_QUEUE' start: /bin/bash
[UTC Oct 5 03:07:08] error : 'resque_worker_production_QUEUE' failed to start
So I'm not sure how to debug this further. Any suggestions?