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 problem. 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 0.0.0.0:3013 ** 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) (Errno::EADDRNOTAVAIL) from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/tcphack.rb:12:in `initialize'' 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 `run'' 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. Thanks Nii Amon. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071213/1fbd18c2/attachment.html
Nii Amon Dsane escribi?:> Hi list, >Hi Nii,> > 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 0.0.0.0:3013 <http://0.0.0.0:3013>In your config/mongrel_cluster.yml try setting address parameter to 127.0.0.1 and explain results. Regards -- Rafael Garcia Ortega -------------- next part -------------- A non-text attachment was scrubbed... Name: rgo.vcf Type: text/x-vcard Size: 241 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20071213/27100c6c/attachment.vcf
Hi Rafael, Thanks for the quick response. I am not using mongrel_cluster yet. I am just starting each mongrel_rails instance manually. The command I use is below: /usr/bin/mongrel_rails start -c /srv/rails/appname -P /srv/rails/appname/log/mongrel.pid -l /srv/rails/appname/log/mongrel.log -e production -d -p 3013. I cd to RAILS_ROOT and then issue that command as root and then the error appears. Thanks Nii Amon Rafael Garc?a wrote:> Nii Amon Dsane escribi?: >> Hi list, >> > Hi Nii, >> >> 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 0.0.0.0:3013 <http://0.0.0.0:3013> > > In your config/mongrel_cluster.yml try setting address parameter to > 127.0.0.1 and explain results. > > Regards-- Posted via http://www.ruby-forum.com/.
Try adding -a option: /usr/bin/mongrel_rails start -c /srv/rails/appname -P /srv/rails/appname/log/mongrel.pid -l /srv/rails/appname/log/mongrel.log -e production -d -p 3013 -a 127.0.0.1 Only for check if run. Nii amon Dsane escribi?:> Hi Rafael, > > Thanks for the quick response. > > I am not using mongrel_cluster yet. I am just starting each > mongrel_rails instance manually. The command I use is below: > > /usr/bin/mongrel_rails start -c /srv/rails/appname -P > /srv/rails/appname/log/mongrel.pid -l /srv/rails/appname/log/mongrel.log > -e production -d -p 3013. > > I cd to RAILS_ROOT and then issue that command as root and then the > error appears. > > Thanks > Nii Amon > > Rafael Garc?a wrote: > >> Nii Amon Dsane escribi?: >> >>> Hi list, >>> >>> >> Hi Nii, >> >>> 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 0.0.0.0:3013 <http://0.0.0.0:3013> >>> >> In your config/mongrel_cluster.yml try setting address parameter to >> 127.0.0.1 and explain results. >> >> Regards >> > >-- Rafael Garcia Ortega -------------- next part -------------- A non-text attachment was scrubbed... Name: rgo.vcf Type: text/x-vcard Size: 251 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20071213/342c7a54/attachment-0001.vcf
Hi Rafael, I tried it with the -a switch and still the same error. I tried it against all the IPs that ifconfig reported but it still failed. Thanks Nii Amon Rafael Garc?a wrote:> Try adding -a option: > > /usr/bin/mongrel_rails start -c /srv/rails/appname -P > /srv/rails/appname/log/mongrel.pid -l /srv/rails/appname/log/mongrel.log > -e production -d -p 3013 -a 127.0.0.1 > > Only for check if run. > > Nii amon Dsane escribi?:-- Posted via http://www.ruby-forum.com/.
Reasonably Related Threads
- Mongrel not starting: `initialize_without_backlog'': Cannot assign requested address - bind(2) (Errno::EADDRNOTAVAIL)
- Mongrel error since updating to OSX 10.5.3
- upload_progress and DRb.start_service crashes
- breakpointer error
- DRb error when using rails_spec on OS X