Forum: Ruby on Rails Mongrel PID Issues

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
305a6311b8b926f862288a831ef79a3f?d=identicon&s=25 kwest (Guest)
on 2007-06-12 01:52
(Received via mailing list)
I finally got my app to deploy using Capistrano, but now I cannot get
Mongrel to run on the server this is the error I keep getting:

!! PID file log/mongrel.8000.pid does not exist
Aa33613fb12765fe505efea87844a12e?d=identicon&s=25 Craig White (Guest)
on 2007-06-12 02:08
(Received via mailing list)
On Mon, 2007-06-11 at 23:50 +0000, kwest wrote:
> I finally got my app to deploy using Capistrano, but now I cannot get
> Mongrel to run on the server this is the error I keep getting:
>
> !! PID file log/mongrel.8000.pid does not exist
----
try making the 'log' directory writable for everyone...

chmod g+w,o+w log

--
Craig White <craig@tobyhouse.com>
Ef3aa7f7e577ea8cd620462724ddf73b?d=identicon&s=25 Rob Biedenharn (Guest)
on 2007-06-12 03:07
(Received via mailing list)
On Jun 11, 2007, at 8:06 PM, Craig White wrote:

>
> --
> Craig White <craig@tobyhouse.com>

I found that the defaults for the location of the PID files seemed to
differ between start and stop.  I "solved" that problem by specifying
the exact (relative) location of the pid file for both startup and
shutdown.  The parts of my /etc/init.d/mongrel file are below:

function startup() {
     host=127.0.0.1
     for port in 8000 8001 8002; do
         mongrel_rails start --daemonize -e production --port $port -
a $host --pid tmp/pids/mongrel.${port}.pid -c ${1:-$BASEDIR}
     done
}

function shutdown() {
     cd ${1:-BASEDIR}
     for pidfile in tmp/pids/mongrel*.pid; do
         mongrel_rails stop --pid $pidfile -c ${1:-$BASEDIR}
     done
}

I hope this helps you.  You might also look at mongrel-cluster (as I
should one day) to manage a pack of mongrels.

-Rob

Rob Biedenharn    http://agileconsultingllc.com
Rob@AgileConsultingLLC.com
This topic is locked and can not be replied to.