Launching DRb server on reboot

I’m hoping for a little insight. We’re using ferret with DRb server
and having a hard time getting it to come back up on reboot of the
machine.

In our RAILS_ROOT directory, we’ve got a script named start_ferret.
Here’s the content:

#!/bin/bash

FERRET_USE_LOCAL_INDEX=1 script/runner -e production
vendor/plugins/acts_as_ferret/script/ferret_start

(that’s all one line)

If I wait until the server is done rebooting, and run this script
myself, I never have any problem. So the next step was trying to make
sure DRb server comes back up if the server reboots, so, I did this in
/etc/rc.d/rc.local:

CURDIR=pwd
cd /www/ourdomain.com/www.ourdomain.com/ror_root

./start_ferret
cd $CURDIR

However, the DRb server never comes up after reboot. Any ideas?

Our setup:
mongrel_cluster, proxied by apache 2.2, rails 1.2.3, ruby 1.6. It’s
on a RHE4 machine. I’d be happy to post any log info if I could find
any that pertained to this.

Thanks in advance,

Sean

Hi Sean,

do you get any more information in the ferret server log file?
(log/ferret_server.log according to the code in trunk)

Also, when you run it manually and it works, what user are you logged in
as? Things started from rc.local will be run as root - though I don’t
know why this would be causing a problem (it’s not good security
though).

Also, bit of an obvious one, but make sure rc.local is actually being
called on boot. Check the symlinks in the relevant init level dir
(usually /etc/rc2.d on servers, at least on Debian/Ubuntu)

John.

On Fri, 2007-04-20 at 16:51 -0400, Sean B. wrote:

I’m hoping for a little insight. We’re using ferret with DRb server
and having a hard time getting it to come back up on reboot of the
machine.


http://johnleach.co.uk