So, I was trying to run Webrick server for my Rails project on my work PC, and I got this error:
=> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)
=> Rails 2.1.1 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
Exiting
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel/tcphack.rb:
12:in `initialize_without_backlog’: Only one usage of each socket address (protocol/network address/port) is normally permitted. – bind(2) (Errno::EADDRINUSE)
from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel/tcphack.rb:12:in initialize’
from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:93:in `new’ from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:93:in `initialize’
from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel/configurator.rb:139:in new’
from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel/configurator.rb:139:in `listener’
from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/mongrel_rails:99:in `cloaker_’
from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel/configurator.rb:50:in `call’
from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel/configurator.rb:50:in `initialize’
… 14 levels…
from C:/Dev/Rails/ringleys/vendor/rails/railties/lib/commands/server.rb:
39
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’
from script/server:3
I’ve never seen this error before, and looking at the error message and the stack trace, it just didn’t make any sense. Moreover, if I run this same project on my Mac, it works fine. No what ? Off to Goggle then …
Which sent me the this article on the RoR Wiki.
Reading from that article, and I quote:
Today I realized the culprit is Microsoft Firewall Client (an ISA firewall client which is installed on Windows machines on certain corporate networks). Try disabling the firewall client, via right-clicking the taskbar icon, then restarting Webrick. Disabling the firewall client seems to release the port, allowing Webrick to start normally.
had made me realise about something that had been the bane of me with this work PC, it’s the frecking Juniper’s Netscreen Remote ! It’s this piece of VPN Tunneling software that allows me to connect to our company network when I’m working from home. Well, I didn’t think that I could disable this, cause I needed it. So I did the second best solution.
I ran the Webrick server on other port other than 3000 !
Something in the line of :
ruby script/server -p 3001
et voila! It worked.
Hope this helps !
No related posts.












just kill ruby.exe process using taskmgr
Well, that's another problem, I couldn't find the process in Task Manager (at least that's what I remember).
port 3001 works for me thanks
Glad I could help :)
thanks for help
thanks for this, it does help me
Glad I could help.