# Mongrel working but not mongrel cluster!

**URL:** <https://www.ruby-forum.com/t/mongrel-working-but-not-mongrel-cluster/109496>\
**Category:** Deployment\
**Created:** [July 15, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/mongrel-working-but-not-mongrel-cluster/109496 "2007-07-15T21:53:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addame](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ecd19e/32.png) [@addame](https://www.ruby-forum.com/u/addame)\
**Post date:** [July 15, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/mongrel-working-but-not-mongrel-cluster/109496/1 "2007-07-15T21:53:04Z")

</div>

Hi guys,

I have installed mongrel and mongrel cluster in a new linux box … at  
the end of the day I was able to lunch mongrel (mongrel\_rails start -e  
production) and all is working fine with.  
However, when I tried to set a mongrel cluster the command mongrel\_rails  
cluster::start get the following output :

starting port 8000  
starting port 8001  
starting port 8002

But when I lunched the browser to the application url and port 8000 for  
example, the mongrels seems not working.

I looked at the log file and get for the first mongrel instance :

\*\* Daemonized, any open files are closed. Look at tmp/mongrel.8000.pid  
and log/mongrel.8000.log for info.  
\*\* Starting Mongrel listening at 0.0.0.0:8000  
\*\* Changing group to mongrel.  
\*\* Changing user to mongrel.  
\*\* Starting Rails with production environment…  
\*\* Mounting Rails at /home/rails/projects/myapps…  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:30:in  
`gem_original_require': no such file to load -- /home/rails/projects/jokes/config/environment (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in`require’  
from  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:157:in  
`rails' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:116:in`cloaker\_’  
from  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in  
`call' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in`listener’  
from  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:98:in  
`cloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in`call’  
from  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in  
`initialize' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in`new’  
from  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:83:in `run' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in`run’  
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:248  
from /usr/bin/mongrel\_rails:16:in `load’  
from /usr/bin/mongrel\_rails:16

It’s the same thing for the two other instances.

My mongrel cluster configuration is as follows :

user: mongrel  
group: mongrel  
cwd: /home/rails/projects/myapps  
log\_file: log/mongrel.log  
port: “8000”  
environment: production  
address: 127.0.0.1  
pid\_file: tmp/mongrel.pid  
servers: 3

Can anyone give help me to get out of this ?

Thanks a lot in adavance

---

<div class="post-metadata">

**Author:** ![addame](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ecd19e/32.png) [@addame](https://www.ruby-forum.com/u/addame)\
**Post date:** [July 16, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/mongrel-working-but-not-mongrel-cluster/109496/2 "2007-07-16T18:44:14Z")

</div>

YAY … I finally find the problem !!!

Here’s how I proceeded … there are some mongrel\_cluster behavior I  
don’t yet understand but at least it’s now working fine on my server.

I checked if mongrel\_rails start will work without specifying a  
mongrel\_cluster.yml … and yes it works !!  
However, in the default setting only two instances are lunched from  
ports 3000 and 3001.  
As I checked the code source of mongrel\_rails, it seems that it’s  
merging the parameters passed to it with default ones (right ?).  
So I tried to overwrite only the important parameters … like the port  
numbers the number of servers and the environment variable. So I  
modified my mongrel\_cluster.yml from :

user: mongrel  
group: mongrel  
cwd: /home/rails/projects/myapps  
log\_file: log/mongrel.log  
port: “8000”  
environment: production  
address: 127.0.0.1  
pid\_file: tmp/pids/mongrel.pid  
servers: 3  
debug: true

to

port: “8000”  
environment: production  
servers: 3

And now the command :

mongrel\_rails cluster::start -C  
/home/rails/projects/myapps/config/mongrel\_cluster.yml

et voilÃ tout marche bien !!!

I hope that this will help some of you.

Addame

Mehdi A. wrote:

> Hi guys,
> 
> I have installed mongrel and mongrel cluster in a new linux box … at  
> the end of the day I was able to lunch mongrel (mongrel\_rails start -e  
> production) and all is working fine with.  
> However, when I tried to set a mongrel cluster the command mongrel\_rails  
> cluster::start get the following output :
> 
> starting port 8000  
> starting port 8001  
> starting port 8002
> 
> But when I lunched the browser to the application url and port 8000 for  
> example, the mongrels seems not working.
> 
> I looked at the log file and get for the first mongrel instance :
> 
> \*\* Daemonized, any open files are closed. Look at tmp/mongrel.8000.pid  
> and log/mongrel.8000.log for info.  
> \*\* Starting Mongrel listening at 0.0.0.0:8000  
> \*\* Changing group to mongrel.  
> \*\* Changing user to mongrel.  
> \*\* Starting Rails with production environment…  
> \*\* Mounting Rails at /home/rails/projects/myapps…  
> /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:30:in  
> `gem_original_require': no such file to load -- /home/rails/projects/jokes/config/environment (LoadError) **the line was : /home/rails/projects/myapps/config/environment and not /home/rails/projects/jokes/config/environment** from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in`require’  
> from  
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:157:in  
> `rails' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:116:in`cloaker\_’  
> from  
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in  
> `call' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in`listener’  
> from  
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:98:in  
> `cloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in`call’  
> from  
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in  
> `initialize' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in`new’  
> from  
> /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:83:in `run' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in`run’  
> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:248  
> from /usr/bin/mongrel\_rails:16:in `load’  
> from /usr/bin/mongrel\_rails:16
> 
> It’s the same thing for the two other instances.
> 
> My mongrel cluster configuration is as follows :
> 
> user: mongrel  
> group: mongrel  
> cwd: /home/rails/projects/myapps  
> log\_file: log/mongrel.log  
> port: “8000”  
> environment: production  
> address: 127.0.0.1  
> pid\_file: tmp/mongrel.pid  
> servers: 3
> 
> Can anyone give help me to get out of this ?
> 
> Thanks a lot in adavance
