HPE Service Activator V8 cannot start due to Jboss error "Could not start http listener"

  • KM02586075
  • 10-Oct-2016
  • 18-Jan-2017

Summary

HPE Service Activator V8 (HPSA) does not start on a platform where ipv6 is disabled. "Could not start http listener" and "Protocol family unavailable" can be found in Jboss server.log file. This is due to the wildfly module which default run mode is ipv6. The Java option "-Djava.net.preferIPv4Stack=true" must be set in Jboss configuration file.

Error

The error message is present in server.log

2016-09-15 08:19:45,343 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:150)
 at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
 at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_102]
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_102]
 at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_102]
Caused by: java.net.SocketException: Protocol family unavailable
 at sun.nio.ch.Net.bind0(Native Method) [rt.jar:1.8.0_102]
 at sun.nio.ch.Net.bind(Net.java:433) [rt.jar:1.8.0_102]
 at sun.nio.ch.Net.bind(Net.java:425) [rt.jar:1.8.0_102]
 at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) [rt.jar:1.8.0_102]
 at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) [rt.jar:1.8.0_102]
 at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67) [rt.jar:1.8.0_102]
 at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:182)
 at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243)
 at org.wildfly.extension.undertow.HttpListenerService.startListening(HttpListenerService.java:115)
 at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:147)

Cause

This issue appears when you want to start HPESA V8 on an OS on which ipv6 has been disabled.
The component Wildfly - new in HPE SA V8 - causes the error because ipv6 which is its default mode, and ipv6 is not configured on the system.

Fix

Add a java option in $JBOSS_HOME/bin/standalone.conf 
JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"