Problem getting connected.

Skip to first unread message

May 23, 2013, 5:44:08 AM5/23/13
Hi everyone,

I'm new to all of this and I'm struggling to get my server up and running. I'm using Webbit 0.4.15 with Netty 3.6.6 Final. I copied the example code provided in the Git Wiki. It works flawlessly locally, but when I run it on my linux server I can't seem to connect. My server is running Debian 6.
What do I need to do / configure in order to get it up and running?

Neil Dunn

May 23, 2013, 5:44:57 AM5/23/13
Does you server have multiple network interfaces? It could be binding
to the wrong nic
> --
> You received this message because you are subscribed to the Google Groups
> "Webbit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
> For more options, visit

May 23, 2013, 5:56:27 AM5/23/13
Hi, what do you mean with multiple network interfaces? How can I check the nic binding?

aslak hellesoy

May 23, 2013, 10:46:27 AM5/23/13
to Webbit
On Thu, May 23, 2013 at 4:56 AM, <> wrote:
Hi, what do you mean with multiple network interfaces? How can I check the nic binding?

WebServers.createWebServer(int port) binds to localhost[1] - also known as the loopback interface. That also means it will only accept connections from the same host.
If you want to allow connections from a different host you have to bind to a network interface instead. In other words, you need to bind to an explicit IP address.

You can discover these with the ifconfig command line tool (typically under /sbin/ifconfig).

Try this instead:

        String hostOrIp = ""; // binds to all NICs including localhost. Use a specific IP to narrow it down.
        int port = 8090;
        WebServer webServer = WebServers.createWebServer(Executors.newSingleThreadExecutor(), new InetSocketAddress(hostOrIp, port), URI.create(String.format("http://%s:%d", hostOrIp, port)))
Reply all
Reply to author
0 new messages