[Mongrel] Weird Mongrel error: Not starting.

Nii Amon Dsane jazzyy at gmail.com
Thu Dec 13 08:24:53 EST 2007

Hi list,
I have a problem with Mongrel which is really bugging me. I would really
appreciate any help that anyone can provide to help me in solving this

1. My setup:

Apache front_end with mod_proxy_balancer in front of 4 mongrel/rails
instances of my application.
Rails 1.2.5
Ruby 1.8.6
Mongrel 1.1.1

2. I noticed that the CPU consumption on my server was 100% being consumed
by ruby so I stopped the ruby processes and rebooted the server.

3. After the reboot mongrel_rails fails to load for one particular
application though I have other applications running on the same server
without any issues. This is the error that I get:

** Starting Mongrel listening at
** Starting Rails with development environment...
/usr/lib/ruby/gems/1.8/gems/mongrel- 1.1.1/bin/../lib/mongrel/tcphack.rb:12:in
`initialize_without_backlog': Cannot assign requested address - bind(2)
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/tcphack.rb:12:in
        from /usr/lib/ruby/1.8/drb/drb.rb:865:in `open'
        from /usr/lib/ruby/1.8/drb/drb.rb:865:in `open_server'
        from /usr/lib/ruby/1.8/drb/drb.rb:759:in `open_server'
        from /usr/lib/ruby/1.8/drb/drb.rb:757:in `each'
        from /usr/lib/ruby/1.8/drb/drb.rb:757:in `open_server'
        from /usr/lib/ruby/1.8/drb/drb.rb:1339:in `initialize'
        from /usr/lib/ruby/1.8/drb/drb.rb:1627:in `new'
         ... 31 levels...
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/command.rb:212:in
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/mongrel_rails:281
        from /usr/bin/mongrel_rails:16:in `load'
        from /usr/bin/mongrel_rails:16

4. I tried everything that I know of to resolve the issue but no luck:
    - Did a netstat to check if the port was in use by any other process: No
processes were holding onto that port
    - Checked ifconfig configuration to see if the NICs have been changed in
anyway: No changes had been made to the NICs.

5. To isolate the issue, I checked out the same version of the application
from svn and deployed on the server. Still no luck.

6. Checked out the same version of the application from svn and deployed on
another server with success. Hmm same code different boxes and it is working
says to me that there is something wrong with the configuration on the other
server which is not playing ball with my code.

FYI: I have backgroundrb in vendor/plugins which starts up fine.

Any help in the right direction would be appreciated.

Nii Amon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071213/1fbd18c2/attachment.html 

More information about the Mongrel-users mailing list