Mongrel_Cluster will not Initialise on Reboot

Hi All,

Running Ubuntu Edgy Eft with Apache 2.2.4, mongrel (1.0.1) and
mongrel_cluster (1.0.1.1).

Apache works fine, both manual execute and reboot via /etc/init.d
unfortunately Mongrel_Cluster does not. If I execute;

$ sudo /etc/init.d/mongrel_cluster start/stop/restart, it works fine but
if the system reboots, /etc/init.d/mongrel_cluster fails to initiate.

My Rails application is actually Radiant CMS and my mongrel_cluster
config lives at /var/www/radiant/config/mongrel_cluster.yml.

=> cat config/mongrel_cluster.yml

user: mongrel
cwd: /var/www/radiant
log_file: log/mongrel.log
port: “8000”
environment: production
group: nogroup
address: 127.0.0.1
pid_file: tmp/pids/mongrel.pid
servers: 3

From /etc/init.d

=> ls -al

-rwxr-xr-x 1 root root 1081 2007-04-12 08:25 mongrel_cluster

From /usr/bin

=> ls -al

-rwxr-xr-x 1 root root 371 2007-04-12 07:53
mongrel_cluster_ctl
-rwxr-xr-x 1 root root 348 2007-04-12 07:52 mongrel_rails

From /etc/mongrel_cluster

=> ls -al

lrwxrwxrwx 1 root root 43 2007-04-12 08:24 mongrel_cluster.yml →
/var/www/radiant/config/mongrel_cluster.yml

After reading through Mongrel_rails configuration file does not exist but it does - Deployment - Ruby-Forum it
seems that my setup is correct yet it misbehaves.

Feedback appreciated, bdm.

On 4/12/07, Ben M. [email protected] wrote:

if the system reboots, /etc/init.d/mongrel_cluster fails to initiate.

Did you create the service but never specify when/that it should start?
See
http://www.cyberciti.biz/faq/howto-runlevel-configuration-tool-to-start-service/.

I’d also rename /etc/mongrel_cluster/mongrel_cluster.yml to
radiant.yml or something like that.

HTH,
Isak

Hi Isak,

I installed ‘rcconf’ and ran it. ‘mongrel_cluster’ was already in the
init/rc.d scripts but good point anyway for future reference.

Wiped /etc/mongrel_cluster, redid it and changed to ‘radiant.yml’.

Rebooted, still no ‘mongrel_cluster’ init action.

Isak H. wrote:

On 4/12/07, Ben M. [email protected] wrote:

if the system reboots, /etc/init.d/mongrel_cluster fails to initiate.

Did you create the service but never specify when/that it should start?
See
http://www.cyberciti.biz/faq/howto-runlevel-configuration-tool-to-start-service/.

I’d also rename /etc/mongrel_cluster/mongrel_cluster.yml to
radiant.yml or something like that.

HTH,
Isak

I seem to recall seeing someone with this problem and a blog post
solution
for FreeBSD … IIRC it had to do with ruby environment not being
initialized correctly.

I think the shebang was env ruby1.8 and needed to be explicitly set to
/usr/bin/ruby…

At least that might give you enough to google on further … I don’t
remember where I stumbled across that.

Hank M. wrote:

I seem to recall seeing someone with this problem and a blog post
solution
for FreeBSD … IIRC it had to do with ruby environment not being
initialized correctly.

I think the shebang was env ruby1.8 and needed to be explicitly set to
/usr/bin/ruby…

At least that might give you enough to google on further … I don’t
remember where I stumbled across that.

Hi Hank,

This issue is fixed, I posted that above the entry before yours, sorry,
it is a bit hard to see.

You are correct though, ‘mongrel_cluster_ctl’ requires #!/usr/bin/ruby
to function correctly.

Thanks for your input,

Cheers bdm.

Issue rectified.

Edit => /usr/bin/mongrel_cluster_ctl

Top line, change to => #!/usr/local/bin/ruby

Once complete, save & exit the file.

Ben M. wrote:

Hi Isak,

I installed ‘rcconf’ and ran it. ‘mongrel_cluster’ was already in the
init/rc.d scripts but good point anyway for future reference.

Wiped /etc/mongrel_cluster, redid it and changed to ‘radiant.yml’.

Rebooted, still no ‘mongrel_cluster’ init action.

Isak H. wrote:

On 4/12/07, Ben M. [email protected] wrote:

if the system reboots, /etc/init.d/mongrel_cluster fails to initiate.

Did you create the service but never specify when/that it should start?
See
http://www.cyberciti.biz/faq/howto-runlevel-configuration-tool-to-start-service/.

I’d also rename /etc/mongrel_cluster/mongrel_cluster.yml to
radiant.yml or something like that.

HTH,
Isak