I am running supervisord to keep Redis and other pieces of software up and running. However, I can not, for the life of me, get resque-web to work.

This is the .ini that I'm including:


Unfortunately, when I run service supervisor restart I get the following in the supervisord log:

INFO exited: resque (exit status 127; not expected)

According to Google code 127 is "Command Not Found". However, if I run that command manually the resque-web server boots up just fine with the output of:

[2013-05-24 00:03:09 -0600] Starting 'resque-web'...
[2013-05-24 00:03:09 -0600] trying port 5678...

It's also worth noting that I see the following in the /var/lib/resque/stderr.log when supervisord tries to launch resque-web:

/usr/bin/env: ruby_noexec_wrapper: No such file or directory

So I'm stumped. Every other piece of software I've configured on supervisord works just fine. This is the only one giving me a headache...

Edit 1

So I tried creating a simple bash script to get around this, and now I get a different error in the stderr.log file. The .ini I include is changed to have command=/usr/local/bin/resque-web


source /usr/local/rvm/environments/default


usr/local/rvm/gems/ruby-2.0.0-p195/gems/vegas-0.1.11/lib/vegas/runner.rb:82:in `app_dir': nor --app-dir neither EVN['HOME'] defined (ArgumentError)
        from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/vegas-0.1.11/lib/vegas/runner.rb:66:in `initialize'
        from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/resque-1.24.1/bin/resque-web:13:in `new'
        from /usr/local/rvm/gems/ruby-2.0.0-p195/gems/resque-1.24.1/bin/resque-web:13:in `'
        from /usr/local/rvm/gems/ruby-2.0.0-p195/bin/resque-web:23:in `load'
        from /usr/local/rvm/gems/ruby-2.0.0-p195/bin/resque-web:23:in `'
        from /usr/local/rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `eval'
        from /usr/local/rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `'

Well, it appears that supervisor will not work with resque-web as it's a daemonized process. The solution was to create /etc/cron.d/resque and put the following in it:

* * * * * root resque-web

This runs every minute and reboots the server if it crashes. Good enough for me!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.