sean liu
2007-Aug-14 02:21 UTC
[Mongrel] can not delete pid fils when stopping mongrel_cluster
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
Wayne E. Seguin
2007-Aug-14 14:21 UTC
[Mongrel] can not delete pid fils when stopping mongrel_cluster
On Aug 13, 2007, at 22:21 , sean liu wrote:> 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?Sean, Pay attention to that depreciation notice. Anyway, Check the location of your pid files, you apparantly have old files laying around so mongrel_cluster thinks that mongrels might already be running on the ports it''s trying to startup on. If the mongrels are not running then delete the pid files (rm tmp/pids/ mongrel.*.pid) and try again. ~Wayne s///g Wayne E. Seguin Sr. Systems Architect & Systems Administrator -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070814/0976ad3b/attachment.html