title: why Netty doesn't bind with public IP address & it binds with 127.0.0.1?
body: <p>i got in this weird situation and i can bind ServerBootstrap with local IP address but when i tried with my public IP address it throws an exception : <code>Exception in thread "main" org.jboss.netty.channel.ChannelException: Failed to bind to: /57.88.173.132:5055</code></p>
  
  <p>can someone explain to me what is wrong??? btw im using netty 3.6.1</p>
  
  <blockquote>
    <p>i changed the address its not real they are random numbers but the
    port is real one</p>
  </blockquote>
  
  <p>here is the code </p>
  
  <blockquote>
    <p>private static final String BIND_ADDRESS = "57.88.173.132";
        private static final int PORT = 5055;</p>
  </blockquote>
  
  <pre><code>public Server()
  {
      try
      {
          startup();
      }
      catch (IOException e)
      {
          e.printStackTrace();
      }
  }
  private void startup() throws IOException
  {
      ServerBootstrap serBootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(),Executors.newCachedThreadPool())); 
      serBootstrap.setPipelineFactory(new PipelineFactory());
      serBootstrap.bind(new InetSocketAddress(BIND_ADDRESS,PORT));
  </code></pre>
  
  <p>here is the exception thrown </p>
  
  <pre><code>Exception in thread "main" org.jboss.netty.channel.ChannelException: Failed to bind to: /57.88.173.132:5055
      at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:301)
      at com.game.server.Server.startup(Server.java:33)
      at com.game.server.Server.&lt;init&gt;(Server.java:22)
      at com.game.server.Server.main(Server.java:44)
  Caused by: java.net.BindException: Cannot assign requested address: bind
      at sun.nio.ch.Net.bind0(Native Method)
      at sun.nio.ch.Net.bind(Unknown Source)
      at sun.nio.ch.Net.bind(Unknown Source)
      at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
      at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
      at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
      at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:367)
      at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:291)
      at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
      at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
      at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>