BACKTRACE

(condense)

Back to Posts List

GET

Capistrano 'reaper' error on Passenger Deployments

Capistrano 2’s deploy:restart is still back in the past, where Mongrel clusters still ruled the earth and were the best way to deploy rails.
When dealing with mongrel clusters, Capistrano tries to restart your mongrel processes by issuing the /script/process/reaper script or the spinner script.
Passenger doesn’t do that anymore, you restart your Passenger application servers by simply issuing the a touch tmp/restart.txt in your project root.

But, Capistrano still tries to run reaper (which you don’t setup and don’t even touch when you run Passenger deployments) and encounters an error every time you deploy.

 ** transaction: commit
  * executing `deploy:restart'
  * executing "sudo -p 'sudo password: ' -u app /var/www/twitterooms/current/script/process/reaper"
    servers: [""]
    [] executing command
*** [err :: ] sudo: no passwd entry for app!
    command finished
failed: "sh -c \"sudo -p 'sudo password: ' -u app /var/www/twitterooms/current/script/process/reaper\"" on 

Yeah, the error is unrelated in this case, too lazy to fix that too.. since i don’t care about reaper processes anyway

The fix is to simply override the :restart capistrano task just like that:

# In ur deploy.rb
deploy.task :restart, :roles => :app do
  run "touch #{current_path}/tmp/restart.txt"
end

That’s it.

POST

blog comments powered by Disqus

I Don't have cookies.

ELAD ENV

Variable Value
LINKEDIN
TWITTER
FACEBOOK
GITHUB
WWR
IRC
{ 'irc.freenode.net' => [ '#rubyonrails', '#railsbridge', '#ruby', '#mootools' ]}
SKYPE
eladmeidar

You're seeing this error because I think it is funny.