Bug 900609 (JBPAPP6-1357) - Opened IPv4 sockets on Windows when server is bound to IPv6
Summary: Opened IPv4 sockets on Windows when server is bound to IPv6
Keywords:
Status: CLOSED WONTFIX
Alias: JBPAPP6-1357
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: IPv6 support
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: EAP 6.4.0
Assignee: Default User
QA Contact: Petr Kremensky
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard: eap601candidate
Depends On:
Blocks: JBPAPP6-1159
TreeView+ depends on / blocked
 
Reported: 2012-06-06 16:05 UTC by Miroslav Novak
Modified: 2015-01-27 01:03 UTC (History)
7 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-09-03 14:15:57 UTC
Type: Bug


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


Links
System 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 14:35:39 UTC

Description Miroslav Novak 2012-06-06 16:05:28 UTC
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 16:05:45 UTC
Attachment: Added: boot.log


Comment 2 Miroslav Novak 2012-06-06 16:07:22 UTC
Attachment: Added: tcpview_sockets.png


Comment 3 Rajesh Rajasekaran 2012-06-06 20:13:32 UTC
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 07:55:28 UTC
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 09:14:49 UTC
Link: Added: This issue is a dependency of JBPAPP-9188


Comment 7 Misty Stanley-Jones 2012-06-12 08:43:17 UTC
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 19:46:17 UTC
Labels: Added: eap601candidate


Comment 9 Dana Mison 2012-10-16 05:27:23 UTC
Writer: Added: mistysj


Comment 10 Anne-Louise Tangring 2012-11-13 20:57:48 UTC
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-29 01:41:44 UTC
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 12:03:27 UTC
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 14:15:57 UTC
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.