EJB invocation gets failed with error "Connection reset by peer" in JBoss EAP 6

Solution Verified - Updated -


  • Is it possible to keep a ejb-client connection alive if there is a firewall or network configuration which drop a connection on inactivity?
  • Following errors are seen in the server logs
04:27:20,220 ERROR [org.jboss.remoting.remote.connection] (Remoting "node1" read-1) JBREM000200: Remote connection failed: java.io.IOException: Connection reset by peer
  • EJB2 Stateless session beans are deployed on JBoss 6 EAP whose remote view is being consumed/invoked by web layer with the use standard ServiceLocator pattern implementation. Service Locator class also cache remote home proxy and InitialContext object (i.e. object which is used to locate that EJBHomeProxy). The EJB invocation fails frequently after some time of normal running:
TRACE 22:12:37,747 Remoting "client-endpoint" read-1 RemoteReadListener - Connection error detail java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(Unknown Source)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
        at sun.nio.ch.IOUtil.read(Unknown Source)
        at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
        at org.xnio.nio.AbstractNioStreamChannel.read(AbstractNioStreamChannel.java:249)
        at org.xnio.channels.FramedMessageChannel.receive(FramedMessageChannel.java:87)
        at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:72)
        at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:45)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
        at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
        at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
        at org.xnio.nio.NioHandle.run(NioHandle.java:90)
        at org.xnio.nio.WorkerThread.run(WorkerThread.java:187)
  • A connection for EJB3 invocation initial works. But from time to time, it looks like around the same hours, the invocations failed.


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content