Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8278122

Several network tests fail on Windows if no IPv6 is configured on network interface

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 17, 18
    • core-libs
    • None
    • generic
    • windows

      We see the below tests failing on several of our test machines, the windows installations all are able to support IPv6 but have no IPV6 addresses configured on their network interfaces.
      The tests pass on other machines that have at least a link local ipv6 address configured.

      java/nio/channels/DatagramChannel/AdaptorMulticasting.java
      java/nio/channels/DatagramChannel/Loopback.java
      java/net/DatagramSocket/DatagramSocketExample.java
      java/net/DatagramSocket/DatagramSocketMulticasting.java
      java/net/MulticastSocket/IPMulticastIF.java
      java/net/MulticastSocket/JoinLeave.java
      java/net/MulticastSocket/NoSetNetworkInterface.java

      DatagramSocketExample throes this exception for excample:
      java.net.SocketException: Invalid argument:
      at java.base/sun.nio.ch.Net.setInterface6(Native Method)
      at java.base/sun.nio.ch.DatagramChannelImpl.setOption(DatagramChannelImpl.java:364)
      at java.base/sun.nio.ch.DatagramSocketAdaptor.setOption(DatagramSocketAdaptor.java:420)
      at java.base/java.net.DatagramSocket.setOption(DatagramSocket.java:1194)
      at DatagramSocketExample.test(DatagramSocketExample.java:132)
      at DatagramSocketExample.main(DatagramSocketExample.java:83)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:577)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:833)

      It might be caused by the network code detecting that the OS is IPv6 capable but windows does not allow to use IPv6 socket options for IPv4 only sockets.

            Unassigned Unassigned
            azeller Arno Zeller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: