Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Address family not supported by protocol family: bind

843790Mar 13 2009 — edited Mar 16 2009
Over the past few days a number of users have reported connection issues with our application. We've been able to track the problem to this line of code:

ServerSocketChannel sc = ServerSocketChannel.open();
sc.socket().bind(new InetSocketAddress("localhost", 0)); <- error thrown

The following error is thrown:

java.net.SocketException: Address family not supported by protocol family: bind
sun.nio.ch.Net.bind(Native Method)
sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)

I've read this is something to do with an IPv4 / IPv6 issue. But what I don't understand is that our users have had this working fine for months and we've never had any problems in the past, but within the last couple of days 10 people have contacted us, all with the same issue. We've not released any patches so we've not introduced the problem. Does anyone know what might have changed in the past few days? Did Microsoft release a patch to modify the IPv 4 / 6 protocols?

Apparently the issue might be resolved in Java7, but we have thousands of users, and rolling out a new version of Java is a big upheaval.

Any ideas???

BBB
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2009
Added on Mar 13 2009
9 comments
1,743 views