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

WEBrick only binding to localhost on linux.

Subscribe to WEBrick only binding to localhost on linux. 6 post(s), 2 voice(s)

Avatar ams 4 post(s)

I’m trying to run the jrubystack on a red hat linux computer with multiple NICS.

Starting the server with:

> jruby script/server

show below on startup:

=> Booting WEBrick
=> Rails 2.3.2 application starting on
=> Call with -d to detach
=> Ctrl-C to shutdown server

This implies it is binding to all interfaces. HOWEVER, it only responds to requests from “localhost”

For example:
>curl localhost:3000
works, but

Despite the line “Rails… starting on” it seems to only be binding to !!


> netstat -tulpn | grep :3000


tcp 0 0 ::ffff: :::* LISTEN 25942/java

Help!! Where in the configuration can you fix this?


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

That is strange, is there any firewall enabled?

Avatar ams 4 post(s)

Yes, the firewall adds this line to open port 3000. (I hope this is right, it works for other ports).

-A RH-Firewall-1-INPUT -m state —state NEW -m tcp -p tcp —dport 3000 -j ACCEPT

Could it be related to this bug? See link. The description is almost identical to what I see.

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


yes the rule seems correct but try to disable it and check if that is the problem. In any case we are going to release a new JRuby version today so please check with this new version.


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

We have just released it.

Avatar ams 4 post(s)

Thanks, I just downloaded the new version 1.5.6, and installed it. My problem is now solved!!

While installing the new version however, I found that in the original install of jrubystack 1.2.0, I had answered to the question:

>> Please enter the Tomcat configuration parameters you wish to use.
>> Web Server domain: []:

This time I gave the machine’s DNS name.

So, I’m not sure if the “Web Server domian” setting is the fix, or the new JRuby-Stack version.

Would you where I could manually change the “Web Server domain” setting on the old 1.2.0 stack? If it isn’t too hard I wouldn’t mind figuring out the cause.

Regardless, it is now working. Thanks for the help!!