Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 900609 - (JBPAPP6-1357) Opened IPv4 sockets on Windows when server is bound to IPv6
Opened IPv4 sockets on Windows when server is bound to IPv6
Status: CLOSED WONTFIX
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: IPv6 support (Show other bugs)
6.0.0
Unspecified Unspecified
high Severity high
: ---
: EAP 6.4.0
Assigned To: Default User
Petr Kremensky
http://jira.jboss.org/jira/browse/JBP...
eap601candidate
:
Depends On:
Blocks: JBPAPP6-1159
  Show dependency treegraph
 
Reported: 2012-06-06 12:05 EDT by Miroslav Novak
Modified: 2015-01-26 20:03 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
If JBoss EAP 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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-03 10:15:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
boot.log (6.73 KB, text/plain)
2012-06-06 12:05 EDT, Miroslav Novak
no flags Details
tcpview_sockets.png (80.14 KB, image/png)
2012-06-06 12:07 EDT, Miroslav Novak
no flags Details
Socket behavior test jar (2.30 KB, application/octet-stream)
2014-08-28 21:41 EDT, Brian Stansberry
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPAPP6-1357 Major Closed Opened IPv4 sockets on Windows when server is bound to IPv6 2014-09-03 10:35:39 EDT

  None (edit)
Description Miroslav Novak 2012-06-06 12:05:28 EDT
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.
Comment 1 Miroslav Novak 2012-06-06 12:05:45 EDT
Attachment: Added: boot.log
Comment 2 Miroslav Novak 2012-06-06 12:07:22 EDT
Attachment: Added: tcpview_sockets.png
Comment 3 Rajesh Rajasekaran 2012-06-06 16:13:32 EDT
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 ? 
Comment 4 Miroslav Novak 2012-06-07 03:55:28 EDT
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.
Comment 5 Rostislav Svoboda 2012-06-07 05:14:49 EDT
Link: Added: This issue is a dependency of JBPAPP-9188
Comment 7 Misty Stanley-Jones 2012-06-12 04:43:17 EDT
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
Comment 8 Rajesh Rajasekaran 2012-07-11 15:46:17 EDT
Labels: Added: eap601candidate
Comment 9 Dana Mison 2012-10-16 01:27:23 EDT
Writer: Added: mistysj
Comment 10 Anne-Louise Tangring 2012-11-13 15:57:48 EST
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 
Comment 14 Brian Stansberry 2014-08-28 21:41:44 EDT
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.
Comment 15 Miroslav Novak 2014-09-03 08:03:27 EDT
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
Comment 16 Brian Stansberry 2014-09-03 10:15:57 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.