You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running wildfly-swarm as described in section 18.1.4 on Windows 7 with boot docker running on Oracle VirtualBox the following error gets thrown:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.listener.default: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: Could not start http listener
at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:142)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
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:190)
at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243)
at org.wildfly.extension.undertow.HttpListenerService.startListening(HttpListenerService.java:126)
at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:138)
... 5 more
The solution to this problem is to add the following section to the pom.xml:
<plugins>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<version>${wildfly-swarm-version}</version>
<!-- Add configuration element before executions element -->
<configuration>
<properties>
<java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
</properties>
</configuration>
<executions>
...
Stackoverflow link: https://stackoverflow.com/questions/37273621/fail-to-start-jax-rs-service-on-wildfly-swarm
The text was updated successfully, but these errors were encountered:
Thank you so much for sharing this! I tried to add a line in my Dockerfile: ENV JAVA_OPTS -Xms256m -Xmx512m -Djava.net.preferIPv4Stack=true
but this does not work :/
When running wildfly-swarm as described in section 18.1.4 on Windows 7 with boot docker running on Oracle VirtualBox the following error gets thrown:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.listener.default: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: Could not start http listener
at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:142)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
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:190)
at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243)
at org.wildfly.extension.undertow.HttpListenerService.startListening(HttpListenerService.java:126)
at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:138)
... 5 more
The solution to this problem is to add the following section to the pom.xml:
<plugins>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<version>${wildfly-swarm-version}</version>
<!-- Add configuration element before executions element -->
<configuration>
<properties>
<java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
</properties>
</configuration>
<executions>
...
Stackoverflow link: https://stackoverflow.com/questions/37273621/fail-to-start-jax-rs-service-on-wildfly-swarm
The text was updated successfully, but these errors were encountered: