Thanks Wayne,
That does the trick for me! I simply added this:
task :rollback do
stop
rollback_code
start
end
Cheers,
Casper
On 07/09/2007, at 18:15, Wayne E. Seguin wrote:
On Sep 07, 2007, at 03:30 , Casper Fabricius wrote:
Hi,
I am deploying a Rails website using Capistrano to a VPS running the
site through Apache and Mongrel.
'cap deploy' works fine, and mongrels are restarted. When I execute
'cap deploy:rollback', however, my script fails to restart the
mongrels giving this error:
!!! PID file tmp/pids/mongrel.5000.pid already exists. Mongrel could
be running already. Check your log/mongrel.5000.log for errors.
I have a hunch that the error is related to the fact that I link /
tmp/
pids into the shared directory upon each release in the
"after_update" task, but I'm not sure how I end up with this problem,
as the old dir I'm rolling back also has the link setup. The mongrels
are stopped, but for some reason they don't clean up their PID files,
and thus they fail to start again.
The full output of the rollback looks like this:
http://pastie.caboo.se/94602
My deploy.rb looks like this:
http://pastie.caboo.se/94600
Any help on this issue would be appreciated - thanks!
Best regards,
Casper Fabricius
________________________________________
Casper,
I'd rewrite the default rollback task to:
1. Stop mongrel cluster
2. Rollback
3. Restart mongrel cluster
Between 2-3 you might also want to ensure that the new (old)
"current" directory links the pid directory correctly.
~Wayne
s///g
Wayne E. Seguin
Sr. Systems Architect & Systems Administrator
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users