HornetQ netty-servlet clients hang after a period of time and do not process messages
Issue
- A plain JMS client connects and communicates with JBoss EAP 5.2 HornetQ via a netty-servlet. This servlet has been configured as described in section 14.4.4 of the official documentation1. The URL used to connect is http://{jbossserver}/invoker/JNDIFactory. However, the Java client is disconnected every 60 seconds with the following exception:
INFO: javax.jms.JMSException: HornetQException[errorCode=2 message=Channel disconnected]JMSException: HornetQException[errorCode=2 message=Channel disconnected]
INFO: at org.hornetq.jms.client.HornetQConnection$JMSFailureListener.connectionFailed(HornetQConnection.java:643)
INFO: at org.hornetq.core.client.impl.ClientSessionFactoryImpl.callFailureListeners(ClientSessionFactoryImpl.java:818)
INFO: at org.hornetq.core.client.impl.ClientSessionFactoryImpl.failoverOrReconnect(ClientSessionFactoryImpl.java:605)
INFO: at org.hornetq.core.client.impl.ClientSessionFactoryImpl.handleConnectionFailure(ClientSessionFactoryImpl.java:482)
INFO: at org.hornetq.core.client.impl.ClientSessionFactoryImpl.connectionDestroyed(ClientSessionFactoryImpl.java:363)
INFO: at org.hornetq.core.remoting.impl.netty.NettyConnector$Listener$1.run(NettyConnector.java:687)
INFO: at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
INFO: at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
INFO: at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO: at java.lang.Thread.run(Unknown Source)
INFO: Caused by: HornetQException[errorCode=2 message=Channel disconnected]
- On the server side, the following exception is spit to the JBoss-EAP-5.2 server.log each time:
WARN [RemotingConnectionImpl] Connection failure has been detected: Did not receive data from local:ephemeral.
It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed.
You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information.
The connection will now be closed. [code=3]
WARN [ServerSessionImpl] Client connection failed, clearing up resources for session dd39e571-7e02-11e3-8cf2-7054d2456188
WARN [ServerSessionImpl] Cleared up resources for session dd39e571-7e02-11e3-8cf2-7054d2456188
WARN [ServerSessionImpl] Client connection failed, clearing up resources for session dd3a5aa2-7e02-11e3-8cf2-7054d2456188
WARN [ServerSessionImpl] Cleared up resources for session dd3a5aa2-7e02-11e3-8cf2-7054d2456188
- These 60s disconnects do not happen if the exact same Java client connects to a similarly configured JBoss AS 6.1 environment. What am I missing that might be different between JBoss-EAP 5.2 (HornetQ 2.2.24.GA) and JBoss-EAP-6.1 (HornetQ 2.2.5.Final) ?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.2.0
- HornetQ
- 2.2.24
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.