]
Teresa Miyar Gil moved JBEAP-17706 to WFCORE-4699:
--------------------------------------------------
Project: WildFly Core (was: JBoss Enterprise Application Platform)
Key: WFCORE-4699 (was: JBEAP-17706)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Server
(was: Server)
(was: Web (Undertow))
Affects Version/s: 10.0.0.Final
(was: 7.1.4.GA)
(was: 7.1.6.GA)
(was: 7.2.3.GA)
QE Test Coverage: (was: +)
preferIPv6Addresses and preferIPv4Stack System Properties are
Mishandled in the Config
--------------------------------------------------------------------------------------
Key: WFCORE-4699
URL:
https://issues.jboss.org/browse/WFCORE-4699
Project: WildFly Core
Issue Type: Bug
Components: Server
Affects Versions: 10.0.0.Final
Environment: * JBoss EAP 7.1/7.2
* Interface attached to port 0.0.0.0
* Red Hat Enterprise Linux 7
* IPv6 disabled in the kernel
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
* System properties -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true
Reporter: Teresa Miyar Gil
Assignee: Teresa Miyar Gil
Priority: Major
Labels: ipv6, startup
Error is thrown on startup.
Caused by: java.net.SocketException: Protocol family unavailable
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:179)
at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:310)
at
io.undertow.protocols.ssl.UndertowXnioSsl.createSslConnectionServer(UndertowXnioSsl.java:301)
at
org.wildfly.extension.undertow.HttpsListenerService.startListening(HttpsListenerService.java:127)
The customer ships a turn key solution that has the two system properties set:
-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true because they are
needed for some cases for customers running IPv6, but others want to harden their systems
by disabling IPv4.
This works on JBoss EAP 6, but it throws the error on JBoss EAP 7 on the same version of
Java. Furthermore, adding just Djava.net.preferIPv4Stack=false has the same issue, even
though it the default value, while leaving it off starts.
This appears to be related to
controller/src/main/java/org/jboss/as/controller/interfaces/OverallInterfaceCriteria.java#pruneIPTypes
where if both properties are null, it leaves the set of candidate addresses alone, but it
either are set, it strips out all IPv4 addresses.