[Mongrel] can not delete pid fils when stopping mongrel_cluster

sean liu seanliugm at gmail.com
Mon Aug 13 22:21:38 EDT 2007


Hi all,

i im using Capistrano2 to deploy my rails app and Apache/Mongrel as it's
env. All is well except deploy:rollback  task. the following is log messages
when running cap deploy:rollback :

[DEPRECATION] Capistrano.configuration is deprecated. Use Capistrano::
Configuration.instance instead
  * executing `deploy:rollback'
  * executing `deploy:rollback_code'
  * executing "ls -x /var/www/apps/person/releases"
    servers: ["localhost"]
Password:
    [localhost] executing command
    command finished
  * executing "rm /var/www/apps/person/current; ln -s
/var/www/apps/person/releases/20070813090159 /var/www/apps/person/current &&
rm -rf /var/www/apps/person/releases/20070814020542"
    servers: ["localhost"]
    [localhost] executing command
    command finished
  * executing `deploy:restart'
  * executing `restart_mongrel_cluster'
  * executing "sudo mongrel_rails cluster::restart -C
/var/www/apps/person/current/config/mongrel_cluster.yml"
    servers: ["localhost"]
    [localhost] executing command
 ** [out :: localhost] ** Ruby version is not up-to-date; loading
cgi_multipart_eof_fix
 ** [out :: localhost] stopping port 3000
 ** [out :: localhost] ** Ruby version is not up-to-date; loading
cgi_multipart_eof_fix
 ** [out :: localhost] stopping port 3001
 ** [out :: localhost] ** Ruby version is not up-to-date; loading
cgi_multipart_eof_fix
 ** [out :: localhost]
 ** [out :: localhost] stopping port 3002
 ** [out :: localhost] ** Ruby version is not up-to-date; loading
cgi_multipart_eof_fix
 ** [out :: localhost] starting port 3000
 ** [out :: localhost] ** Ruby version is not up-to-date; loading
cgi_multipart_eof_fix
 ** [out :: localhost] ** !!! PID file tmp/pids/mongrel.3000.pid already
exists.  Mongrel could be running already.  Check your log/mongrel.3000.log
for errors.
 ** [out :: localhost] ** !!! Exiting with error.  You must stop mongrel and
clear the .pid before I'll attempt a start.
 ** [out :: localhost]
 ** [out :: localhost] starting port 3001
 ** [out :: localhost] ** Ruby version is not up-to-date; loading
cgi_multipart_eof_fix
 ** [out :: localhost] ** !!! PID file tmp/pids/mongrel.3001.pid already
exists.  Mongrel could be running already.  Check your log/mongrel.3001.log
for errors.
 ** [out :: localhost] ** !!! Exiting with error.  You must stop mongrel and
clear the .pid before I'll attempt a start.
 ** [out :: localhost]
 ** [out :: localhost]
 ** [out :: localhost] starting port 3002
 ** [out :: localhost] ** Ruby version is not up-to-date; loading
cgi_multipart_eof_fix
 ** [out :: localhost] ** !!! PID file tmp/pids/mongrel.3002.pid already
exists.  Mongrel could be running already.  Check your log/mongrel.3002.log
for errors.
 ** [out :: localhost] **
 ** [out :: localhost] !!! Exiting with error.  You must stop mongrel and
clear the .pid before I'll attempt a start.
 ** [out :: localhost]
    command finished

what deploy:rollback task does : remove current symlink, link "current" back
to previous release directory, delete the recent release directory, restart
mongrel cluster. And all the pid files and log files in all the releases
directories are syslinked to shared directory.
when i issue cap restart_mongrel_cluster command alone, everything is ok. So
i guess the problem is due to "rm /var/www/apps/person/current; ln -s
/var/www/apps/person/releases/20070813090159 /var/www/apps/person/current &&
rm -rf /var/www/apps/person/releases/20070814020542". How did that happen?
Any suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070814/48e553ad/attachment-0001.html 


More information about the Mongrel-users mailing list