JBoss EAP server (or JBoss CLI process) failed to start because org.xnio.nio.NioXnioProvider could not be instantiated
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6
- 7
Issue
-
Server failed to start with the following stack traces
EAP 609:23:08,823 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-10) MSC000001: Failed to start service jboss.remoting.endpoint.subsystem: org.jboss.msc.service.StartException in service jboss.remoting.endpoint.subsystem: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75] Caused by: java.util.ServiceConfigurationError: org.xnio.XnioProvider: Provider org.xnio.nio.NioXnioProvider could not be instantiated at java.util.ServiceLoader.fail(ServiceLoader.java:224) [rt.jar:1.7.0_75] at java.util.ServiceLoader.access$100(ServiceLoader.java:181) [rt.jar:1.7.0_75] at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377) [rt.jar:1.7.0_75] at java.util.ServiceLoader$1.next(ServiceLoader.java:445) [rt.jar:1.7.0_75] at org.xnio.Xnio.doGetInstance(Xnio.java:187) [xnio-api-3.0.10.GA-redhat-1.jar:3.0.10.GA-redhat-1] at org.xnio.Xnio.getInstance(Xnio.java:146) [xnio-api-3.0.10.GA-redhat-1.jar:3.0.10.GA-redhat-1] at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:73) [jboss-remoting-3.2.19.GA-redhat-1.jar:3.2.19.GA-redhat-1] at org.jboss.as.remoting.EndpointService.start(EndpointService.java:71) [jboss-as-remoting-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] ... 3 more Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.xnio.nio.NioXnioProvider at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_75] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_75] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_75] at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_75] at java.lang.Class.newInstance(Class.java:379) [rt.jar:1.7.0_75] at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373) [rt.jar:1.7.0_75] ... 10 more 09:23:08,823 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.remoting.endpoint.management: org.jboss.msc.service.StartException in service jboss.remoting.endpoint.management: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75] Caused by: java.util.ServiceConfigurationError: org.xnio.XnioProvider: Provider org.xnio.nio.NioXnioProvider could not be instantiated at java.util.ServiceLoader.fail(ServiceLoader.java:224) [rt.jar:1.7.0_75] at java.util.ServiceLoader.access$100(ServiceLoader.java:181) [rt.jar:1.7.0_75] at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377) [rt.jar:1.7.0_75] at java.util.ServiceLoader$1.next(ServiceLoader.java:445) [rt.jar:1.7.0_75] at org.xnio.Xnio.doGetInstance(Xnio.java:187) at org.xnio.Xnio.getInstance(Xnio.java:146) at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:73) at org.jboss.as.remoting.EndpointService.start(EndpointService.java:71) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] ... 3 more Caused by: java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_75] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_75] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_75] at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_75] at java.lang.Class.newInstance(Class.java:379) [rt.jar:1.7.0_75] at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373) [rt.jar:1.7.0_75] ... 10 more Caused by: java.lang.IllegalStateException: No functional selector provider is available at org.xnio.nio.NioXnio$2.run(NioXnio.java:158) at org.xnio.nio.NioXnio$2.run(NioXnio.java:81) at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_75] at org.xnio.nio.NioXnio.<init>(NioXnio.java:80) at org.xnio.nio.NioXnioProvider.<clinit>(NioXnioProvider.java:34) ... 16 moreEAP 7
XXXXXX ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service org.wildfly.io.worker.default: org.jboss.msc.service.StartException in service org.wildfly.io.worker.default: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalArgumentException: XNIO001001: No XNIO provider found at org.xnio.Xnio.doGetInstance(Xnio.java:255) at org.xnio.Xnio.getInstance(Xnio.java:198) at org.wildfly.extension.io.WorkerService.start(WorkerService.java:51) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) ... 3 more
EAP 7 outputs ERROR messages with "XNIO001001: No XNIO provider found". It is necessary to enable a debug log of org.xnio to confirm the same messages as EAP 6.
Resolution
The limits of dynamic ports or file descriptors may have been reached. Please check the netstat output to see the state of the sockets, and restart the server.
Root Cause
- It was suspected a race condition issue reported as This content is not included.XNIO-284, but it has already been fixed in EAP 7.1.0. However, actually, Content from github.com is not included.the messages can be outputted at XNIO initialization failure due to hitting the limits of file descriptors or dynamic ports (ephemeral ports).
- XNIO chooses the selector implementation Content from github.com is not included.by trying to open the selector (and close it immediately) through various SelectorProvider at the initialization of NioXnio instance. However, it can vary how each selector implementation utilizing the underlying resources; for example, Java's default NIO Selector implementation uses file descriptors (1 eventpoll and 2 pipes) per each selector instance on Linux, and it uses a loopback connection using an ephemeral port for intra-process signaling per each selector instance on Windows. So, the XNIO initialization can fail to choose a selector implementation due to the failure of opening a selector instance by hitting the limits of file descriptors or ephemeral ports. So, if file descriptor exhaustion occurs on Linux or ephemeral port exhaustion occurs on Windows at starting a new JBoss EAP or JBoss CLI process, the startup can fail with the ERROR message "XNIO001001: No XNIO provider found".
SBR
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.