Details
-
Enhancement
-
Resolution: Unresolved
-
Major
-
None
-
None
-
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.