JDK-6882910 : Unexplained lack of IP4 network ability when transparent IP6 to IP4 is disabled.
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 5.0,6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2009-09-17
  • Updated: 2011-05-17
  • Resolved: 2011-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
7 b109Fixed
Related Reports
Duplicate :  
In Linux and BSD at least, the invisible forwarding of connections between IP6 and IP4 space can be disabled.  In at least 1 BSD, this is disabled by default for security reasons.
When this feature is disabled, the JRE loses its networking ability and there is no sign to the user of why.

In Linux, the feature can be disabled by the kernel setting
net.ipv6.bindv6only = 1
. This can be done by the sysctl utility as in
sysctl net.ipv6.bindv6only=1
. and disabled by
sysctl net.ipv6.bindv6only=0

Make apparent to the user why JRE networking is not functioning.
Increase security.

There are at least 3 ways to address this.

The most desirable is to use IP4 or IP6 networking as appropriate for the network connection to be established.

The second is to give a more helpful error message to the user upon error. This may require more program logic.

The third option is to ship a description of the problem in installation or troubleshooting documentation.
An error message which does not bring the user close to being able to discover the cause.

In the case of runnig the appletviewer, it provides:
I/O exception while reading: Network is unreachable

Otherwise one often receives an exception message and stack trace.

---------- BEGIN SOURCE ----------
sysctl net.ipv6.bindv6only=1
appletviewer http://www.javatester.org/version.html

---------- END SOURCE ----------

sysctl net.ipv6.bindv6only=0

EVALUATION Changeset: 1f996198877b Author: chegar Date: 2010-08-10 17:30 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1f996198877b 6882910: Unexplained lack of IP4 network ability when transparent IP6 to IP4 is disabled. Reviewed-by: alanb ! src/solaris/native/java/net/PlainDatagramSocketImpl.c ! src/solaris/native/java/net/PlainSocketImpl.c ! src/solaris/native/sun/nio/ch/Net.c

EVALUATION The IPv6 support in the JDK assumes dual-listener and support for IPv4 mapped addresses. IPv6 sockets are used by default if IPv6 is enabled and the implementation assumes that IPV6_V6ONLY defaults to 0. If distributions start shipping with this enabled then the JDK will need to be changed so that it sets this socket option to 0 (at socket create time).