JDK-8222562 : IPv6 only systems fail on setsockopt(IPV6_V6ONLY, 0)
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-04-16
  • Updated: 2019-05-02
  • Resolved: 2019-04-25
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.
JDK 13
13 b19Fixed
Description
Some of the networking code tries to support dual socket support. However, it doesn't work with IPv6 only systems.
With our custom kernel that disables IPv4, setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, 0) fails, and then the networking code bails.

If IPv4 is detected to not be working, the IPV6_V6ONLY option should not be set.
Comments
Relevant thread on net-dev: https://mail.openjdk.java.net/pipermail/net-dev/2019-April/012374.html
18-04-2019

For now, this issue seems most unlikely. On macOS it is possible to disable IPv4 on most / all, of the network interfaces, but support remains in the kernel so the option can be unset without issue. Linux is similar, of course it is possible to compile a custom kernel without IPv4 support, but it is not widely done and requires source code change to the kernel ( menuconfig does not provide an option to disable IPv4 ).
18-04-2019