IdentityAccessManager error: Caused by: java.net.SocketException: Protocol family unavailable
search cancel

IdentityAccessManager error: Caused by: java.net.SocketException: Protocol family unavailable

book

Article ID: 101417

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization

Issue/Introduction

Identity Access Manager will not start, and the iam log file contains an error similar to 
 

WFLYUT0082: Could not start 'default' listener.
	at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:181)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
	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:179)
	at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:310)
	at org.wildfly.extension.undertow.HttpListenerService.startListening(HttpListenerService.java:106)
	at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:169)

Environment

All supported DevTest releases running on Linux with IPv6 enabled.

Cause

This is a an error from the JBOSS application server (Wildfly) that failed to open a socket to listen for incoming connections due to attempting to open an IPv6 socket

Resolution

The JAVA_OPTS environment variable must be set to contain -Djava.net.preferIPv4Stack=true prior to starting the IdentityAccessManager 

Modify the DevTest_Home/IdentityAccessManager/bin/standalone.conf, adding these two lines:

#Force IPv4 connection
JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true" 


 

Additional Information

https://gist.github.com/dekstroza/659873964cbec2678f75c602fdf23716