Affects: Release Notes project_key: JBPAPP6 When EAP 6 server is started with: {code}-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"{code} on IPv6 global address 2620:52:0:105f:1981:a38e:460c:3917 on Windows 2008 R2 (64 bit) with Oracle JDK 1.7 then there are opened IPv4 sockets. Taken from TCPView: {code} java.exe 7020 TCP 127.0.0.1 53098 127.0.0.1 53103 ESTABLISHED java.exe 7020 TCP 127.0.0.1 53099 127.0.0.1 53101 ESTABLISHED java.exe 7020 TCP 127.0.0.1 53100 127.0.0.1 53102 ESTABLISHED java.exe 7020 TCP 127.0.0.1 53101 127.0.0.1 53099 ESTABLISHED java.exe 7020 TCP 127.0.0.1 53102 127.0.0.1 53100 ESTABLISHED java.exe 7020 TCP 127.0.0.1 53103 127.0.0.1 53098 ESTABLISHED java.exe 7020 TCP 127.0.0.1 53104 127.0.0.1 53105 ESTABLISHED java.exe 7020 TCP 127.0.0.1 53105 127.0.0.1 53104 ESTABLISHED java.exe 7020 TCP 127.0.0.1 53106 127.0.0.1 53107 ESTABLISHED java.exe 7020 TCP 127.0.0.1 53107 127.0.0.1 53106 ESTABLISHED java.exe 7020 TCP 0.0.0.0 4447 0.0.0.0 0 LISTENING java.exe 7020 TCP 0.0.0.0 8080 0.0.0.0 0 LISTENING java.exe 7020 TCP 0.0.0.0 9990 0.0.0.0 0 LISTENING java.exe 7020 TCP 0.0.0.0 9999 0.0.0.0 0 LISTENING java.exe 7020 TCPV6 [2620:52:0:105f:1981:a38e:460c:3917] 4447 [0:0:0:0:0:0:0:0] 0 LISTENING java.exe 7020 TCPV6 [2620:52:0:105f:1981:a38e:460c:3917] 8080 [0:0:0:0:0:0:0:0] 0 LISTENING java.exe 7020 TCPV6 [2620:52:0:105f:1981:a38e:460c:3917] 9990 [0:0:0:0:0:0:0:0] 0 LISTENING java.exe 7020 TCPV6 [2620:52:0:105f:1981:a38e:460c:3917] 9999 [0:0:0:0:0:0:0:0] 0 LISTENING {code} Added boot.log + screen shot from TCPView.
Attachment: Added: boot.log
Attachment: Added: tcpview_sockets.png
Mirek, looking at boot.log, I see -Djboss.bind.address.management=2620:52:0:105f:1981:a38e:460c:3917 -Djboss.bind.address.unsecure=2620:52:0:105f:1981:a38e:460c:3917 . Is -Djboss.bind.address (-b) required as well ?
Hi Rajesh, yes, (-b) is required. I was convinced that I put it there but for sure I tried to start server again with command: {code} standalone.bat -b=2620:52:0:105f:1981:a38e:460c:3917 -Djboss.bind.address=2620:52:0:105f:1981:a38e:460c:3917 -bunsecure=2620:52:0:105f:1981:a38e:460c:3917 -bmanagement=2620:52:0:105f:1981:a38e:460c:3917 {code} and there is the same result.
Link: Added: This issue is a dependency of JBPAPP-9188
Release Notes Docs Status: Added: Documented as Known Issue Release Notes Text: Added: If JBoss Enterprise Application 6 is started in Microsoft Windows server with the IPv4 stack disabled and the IPv6 stack enabled, IPv4 sockets are still opened. This issue is still under investigation. Affects: Added: Release Notes
Labels: Added: eap601candidate
Writer: Added: mistysj
Release Notes Docs Status: Removed: Documented as Known Issue Writer: Removed: mistysj Release Notes Text: Removed: If JBoss Enterprise Application 6 is started in Microsoft Windows server with the IPv4 stack disabled and the IPv6 stack enabled, IPv4 sockets are still opened. This issue is still under investigation. Docs QE Status: Removed: NEW
Created attachment 932528 [details] Socket behavior test jar I don't believe this has anything to do with EAP; it's a behavior of the JDK on the OS. To validate this, please use the attached socket-test.jar and java -cp socket-test.jar test.Main <some IPv6 address> and then see what sockets are open. I expect you'll see <some IPv6 address>:9090 and 0.0.0.0:9090. You can add -Djava.net.preferIPv4Stack=false and -Djava.net.preferIPv6Addresses=true if you like, although they don't matter, since the former is the same as the default and the latter only affects DNS lookups. The code here is simple, low level socket programming; i.e. this shows basic JDK behavior. public class Main { public static void main(String[] args) { String address = args[0]; try { InetAddress inetAddress = InetAddress.getByName(address); new ServerSocket(9090, 10, inetAddress); Thread.sleep(60000); } catch (IOException e) { throw new RuntimeException(e); } catch (InterruptedException e) { throw new RuntimeException(e); } } } The JDK doesn't provide the ability to configure IPV6_V6ONLY settings for a socket, so there's nothing EAP can do to affect this behavior.
Hi Brian, thanks for info! I tried socket-test.jar with "-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true" with following results: There is opened just one port with JDK 6: [2620:52:0:105f:1981:a38e:460c:3917]:9090 but on JDK 7 and 8 there are opened 2 ports: [2620:52:0:105f:1981:a38e:460c:3917]:9090 0.0.0.0:9090 If there is nothing what can be done then let's close this bz as won't fix. Thanks, Mirek
Resolving as WONTFIX as this is not a problem with EAP, which has no alternative to relying on the JVM behavior (except something crazy like writing native socket code.) This may be a valid bug report for Open JDK though.