Bug 900609 (JBPAPP6-1357)
Summary: | Opened IPv4 sockets on Windows when server is bound to IPv6 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Miroslav Novak <mnovak> | ||||||||
Component: | IPv6 support | Assignee: | Default User <jbpapp-maint> | ||||||||
Status: | CLOSED WONTFIX | QA Contact: | Petr Kremensky <pkremens> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | high | ||||||||||
Version: | 6.0.0 | CC: | brian.stansberry, lcosti, mnovak, pkremens, rajesh.rajasekaran, rdickens, twells | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | EAP 6.4.0 | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
URL: | http://jira.jboss.org/jira/browse/JBPAPP6-1357 | ||||||||||
Whiteboard: | eap601candidate | ||||||||||
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 14:15:57 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 900553 | ||||||||||
Attachments: |
|
Description
Miroslav Novak
2012-06-06 16:05:28 UTC
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. |