This forum is no longer active. Please post your questions to our new community site

Mongrel Stops Automatically

Subscribe to Mongrel Stops Automatically 4 post(s), 2 voice(s)

Avatar silentsea657 11 post(s)

When I issue the ‘ruby script/server’ command the mongrel shows the following…
I am using RHEL 5.
bash-3.1$ ruby script/server
=> Booting Mongrel
=> Rails 2.3.2 application starting on
=> Call with -d to detach
=> Ctrl-C to shutdown server
/opt/rubystack-1.5-4/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/tcphack.rb:12:in `initialize_without_backlog’: Address already in use – bind(2) (Errno::EADDRINUSE)
from /opt/rubystack-1.5-4/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/tcphack.rb:12:in `initialize’
from /opt/rubystack-1.5-4/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:93:in `new’
from /opt/rubystack-1.5-4/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:93:in `initialize’
from /opt/rubystack-1.5-4/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:10:in `new’
from /opt/rubystack-1.5-4/ruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:10:in `run’
from /opt/rubystack-1.5-4/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:111
from /opt/rubystack-1.5-4/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
from /opt/rubystack-1.5-4/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
from script/server:3

Avatar Beltrán Rueda Administrator 3,714 post(s)


The error shows “Address already in use – bind(2)” So it is possible that other application is binded the 3000 port. You can try to connect to to see the application. You can also use the Terminal to identify the ruby process:

$ ps aux | grep ruby

Anyway you can choose the port, for example 3001:

$ ruby script/server -p 3001

I hope it helps.

Avatar silentsea657 11 post(s)

Ya. You are right. I didn’t run the ‘ruby script/server’ but when I run in the browser, it show the default index page. Please tell me how to stop this.


Avatar Beltrán Rueda Administrator 3,714 post(s)

This process is runnin in the background. You can stop using “kill” command:

$ ps aux | grep ruby
$ kill -9

Another possible solution is to use “killall”:

$ killall .ruby.bin

Of course if you restart the machine this process will be finished.