Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-247

Improve error message on TCP BindException

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • nio-impl
    • None

    Description

      When the TCP bind() fails, sun throws a fairly unhelpful BindException:

      Caused by: java.net.BindException: Address already in use
              at sun.nio.ch.Net.bind0(Native Method)
              at sun.nio.ch.Net.bind(Net.java:437)
              at sun.nio.ch.Net.bind(Net.java:429)
              at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
              at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
              at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:180)
              at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243)
      

      .. that does not include the InetSocketAddress that's being bound to. It would be really helpful to catch this exception and produce a more helpful error message.

      Attachments

        Activity

          People

            Unassigned Unassigned
            raboof_jira Arnout Engelen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: