Why would Webrick use 0.0.0.0:3000 instead of 127.0.0.1:3000


#1

A guy who was working through my Rolling wit Ruby on Rails tutorial had
this
happen and posted it to the articles comments. I’ve never seen this
before… does anyone know what could cause this? I copied his post
below.

Curt

Subject: Problems using Instant Rails
Author: juantar

Text of message:
I am using Instant Rails which comes with Rails 1.0, WEBrick 1.3.1 and
Ruby
1.8.2 and I ran the WEBrick server and it starts on http://0.0.0.0:3000
and
not http://127.0.0.1:3000. However, when I tried to connect to
http://0.0.0.0:3000 using my browser, a dialog pops up telling me that
“the
connection was refused”. Any suggestions on how to solve this problem?.

Thank you.


#2

It doesn’t really mean it is listening on 0.0.0.0 - this actually
means that it is listening on any interface on the computer,
including 127.0.0.1 and any other IP addresses.

Your reader should connect to http://127.0.0.1:3000.


#3

Mine’s always said it starts on 0.0.0.0 (I’m using normal Rails, not the
Instant kind). I just assume its some sort of network-geek alias for
localhost and go there instead. localhost:3000 works fine.

Devin


#4

On Dec 17, 2005, at 9:57 AM, Curt H. wrote:

Text of message:
I am using Instant Rails which comes with Rails 1.0, WEBrick 1.3.1
and Ruby
1.8.2 and I ran the WEBrick server and it starts on http://
0.0.0.0:3000 and
not http://127.0.0.1:3000. However, when I tried to connect to
http://0.0.0.0:3000 using my browser, a dialog pops up telling me
that “the
connection was refused”. Any suggestions on how to solve this
problem?.

Tell them to disable their firewall.


Eric H. - removed_email_address@domain.invalid - http://segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com


#5

I’ve been out all day, but thanks to everyone for all the helpful
answers, and my apologies for the duplicate posts (some problem with
my email).

Curt