Entries Tagged 'Deployment' ↓

sudo: no passwd entry for app! (Capistrano)

If you’ve recently upgraded to Capistrano 2.3+ like I have, you may run into a gotcha with Capistrano’s use of the “sudo” command for a nonexistent “app” user.

If you receive an error that looks like this:

*** [err :: server.hostname.com] sudo: no passwd entry for app!

Then you need to update your deploy file to include the following line:

set :runner, “deploy” (or whatever user you are running as for your deploy)

This error will then promptly go away! Yay!

Mongrel error on Mac OS X: `exec’: Operation not supported

Recently, I got a shiny new Apple MacBook Pro (yay! omg, they are fast). As is customary when you get a new machine, I spent some time setting up Rails and MySQL using instructions at Hivelogic which probes the rough underbelly of the command line. Everything went swimmingly. I installed Mongrel and Mongrel Cluster as well. A problem arose, however, when I tried to deploy something with Capistrano.

Currently, if you do a gem installation of the latest mongrel (sudo gem install mongrel), you will get 0.3.13.4. For mongrel_cluster, you will get 0.2.1.

After successfully installing these with no problem, I tried to deploy one of my apps.

This is the error message that I got in my local console near the end of the deploy:

** [out :: myserver] !!! PID file /Library/Rails/myapp/current/log/mongrel.9998.pid does not exist. Not running?
** [out :: myserver] restart reported an error. Use mongrel_rails restart -h to get help.
** [out :: myserver] mongrel_rails restart -P log/mongrel.9998.pid -c /Library/Rails/myapp/current

At the conclusion of the deploy command, my mongrel instances were not running.

On the server, in myapp/log/mongrel.log, there was this error:

** Restarting with arguments: ruby /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails start -d -e production -p 9998 -a 127.0.0.1 -P log/mongrel.9998.pid -c /Library/Rails/myapp/current –user www –group www
/opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:142:in `exec’: Operation not supported - ruby /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails start -d -e production -p 9998 -a 127.0.0.1 -P log/mongrel.9998.pid -c /Library/Rails/myapp/current –user www –group www (Errno::EOPNOTSUPP)
from /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:142:in `run’
from /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/lib/mongrel/command.rb:199:in `run’
from /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3/bin/mongrel_rails:235
from /opt/local/bin/mongrel_rails:18

I tried rolling back to mongrel 0.3.13.3. This was easy enough to do because currently the mongrel gem installation offers like 39 choices for which version to install. Hey, this can be a good thing sometimes! ;-)
This didn’t help the problem though. The deployment behavior was the same.

As a point of reference, the mongrel version on the server was 0.3.13.3 and mongrel cluster was 0.2.0. Unfortunately, you cannot use gem install to download mongrel_cluster 0.2.0.

So, here is what I did to clear things out and grab the slightly older versions for these gems:


sudo gem uninstall mongrel
4. All versions


sudo gem install mongrel
3. mongrel 0.3.13.3 (ruby)


curl -O http://ftp.iasi.roedu.net/mirrors/rubyforge.org/gems/mongrel_cluster-0.2.0.gem


sudo gem install mongrel_cluster-0.2.0.gem

This fixed the problem and left the server untouched.

Presumably, if you upgrade to the latest mongrel on both the client and server, this problem will go away, but I haven’t tried it yet.

Hopefully this writeup will help someone!