Undertow server port stops listening when socket accept error happens on EAP 7.0.5+

Solution Verified - Updated -

Issue

  • JBoss is running but not accessible through the undertow server listener port (http, ajp, or https). Checking a netstat listing, we see the server socket is missing and no longer in a listening state.
  • After the exceptions below, connections are refused and http 8080 port stop listening:
<http_8080 Accept><org.xnio.nio.tcp.server> Exception accepting request, closing server channel TCP server (NIO) <6fa28018>: java.net.SocketException: Bad file descriptor
        at sun.nio.ch.Net.localPort(Native Method)
        at sun.nio.ch.Net.localAddress(Net.java:479)
        at sun.nio.ch.SocketChannelImpl.<init>(SocketChannelImpl.java:133)
        at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:266)
        at org.xnio.nio.QueuedNioTcpServer.handleReady(QueuedNioTcpServer.java:477)
        at org.xnio.nio.QueuedNioTcpServerHandle.handleReady(QueuedNioTcpServerHandle.java:38)
        at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
: java.net.SocketException: Bad file descriptor
        at sun.nio.ch.Net.localPort(Native Method) [rt.jar:1.8.0_212]
        at sun.nio.ch.Net.localAddress(Net.java:479) [rt.jar:1.8.0_212]
        at sun.nio.ch.SocketChannelImpl.<init>(SocketChannelImpl.java:133) [rt.jar:1.8.0_212]
        at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:266) [rt.jar:1.8.0_212]
        at org.xnio.nio.QueuedNioTcpServer.handleReady(QueuedNioTcpServer.java:477)
        at org.xnio.nio.QueuedNioTcpServerHandle.handleReady(QueuedNioTcpServerHandle.java:38)
        at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)

<http_8080 Accept><org.xnio.nio.tcp.server> Exception accepting request, closing server channel TCP server (NIO) <7fad216f>: java.io.IOException: Too many open files
    at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
    at org.xnio.nio.QueuedNioTcpServer.handleReady(QueuedNioTcpServer.java:477)
    at org.xnio.nio.QueuedNioTcpServerHandle.handleReady(QueuedNioTcpServerHandle.java:38)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
: java.io.IOException: Too many open files
    at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) [rt.jar:1.8.0_212]
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422) [rt.jar:1.8.0_212]
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250) [rt.jar:1.8.0_212]
    at org.xnio.nio.QueuedNioTcpServer.handleReady(QueuedNioTcpServer.java:477)
    at org.xnio.nio.QueuedNioTcpServerHandle.handleReady(QueuedNioTcpServerHandle.java:38)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7.0.5+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In