Channel disconnects running HornetQ embedded in Tomcat6 on Windows
iandavies Oct 25, 2010 6:10 PMHi Everyone,
(using version 2.1.1.Final)
I'm having a problem running HornetQ embedded within a Tomcat6 server on Windows. I actually have a Grails application that, at BootStrap time, loads the HornetQ server as well as two client connections using the InVM connection factory. I'm using programmatic configuration to create the HornetQ server and clients and the JMS interface for actually using the queues. I'm also using Guice and have created a set of classes to all me to inject the necessary queuing classes consumer/queue/session where required.
All I do is start the server and start the clients, and then leave Tomcat running. Anywhere from 2 to 39 minutes later, the clients and server complain that they have not received data from the other party. The client complains with:
javax.jms.JMSException: HornetQException[errorCode=3 message=Did not receive data from server for org.hornetq.core.remoting.impl.invm.InVMConnection@b689e0]
at org.hornetq.jms.client.HornetQConnection$JMSFailureListener.connectionFailed(HornetQConnection.java:603)
at org.hornetq.core.client.impl.FailoverManagerImpl.callFailureListeners(FailoverManagerImpl.java:769)
at org.hornetq.core.client.impl.FailoverManagerImpl.failoverOrReconnect(FailoverManagerImpl.java:731)
at org.hornetq.core.client.impl.FailoverManagerImpl.handleConnectionFailure(FailoverManagerImpl.java:581)
at org.hornetq.core.client.impl.FailoverManagerImpl.access$600(FailoverManagerImpl.java:73)
at org.hornetq.core.client.impl.FailoverManagerImpl$DelegatingFailureListener.connectionFailed(FailoverManagerImpl.java:1151)
at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.callFailureListeners(RemotingConnectionImpl.java:482)
at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.fail(RemotingConnectionImpl.java:254)
at org.hornetq.core.client.impl.FailoverManagerImpl$PingRunnable$1.run(FailoverManagerImpl.java:1209)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
And the server complains with:
2010-10-25 12:42:22,475 [hornetq-failure-check-thread] WARN impl.RemotingConnectionImpl - Connection failure has been detected: Did not receive ping from invm:0. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. The connection will now be closed. [code=3]
2010-10-25 12:42:22,475 [hornetq-failure-check-thread] WARN impl.ServerSessionImpl - Client connection failed, clearing up resources for session 0846f53d-e01f-11df-bfb9-080027910d23
2010-10-25 12:42:23,336 [hornetq-failure-check-thread] WARN impl.ServerSessionImpl - Cleared up resources for session 0846f53d-e01f-11df-bfb9-080027910d23
2010-10-25 12:42:23,336 [hornetq-failure-check-thread] WARN core.ServerSessionPacketHandler - Client connection failed, clearing up resources for session 0846f53d-e01f-11df-bfb9-080027910d23
2010-10-25 12:42:23,336 [hornetq-failure-check-thread] WARN core.ServerSessionPacketHandler - Cleared up resources for session 0846f53d-e01f-11df-bfb9-080027910d23
For the connection factory I have set the following:
connectionFactory.setConnectionTTL(20000);
connectionFactory.setClientFailureCheckPeriod(1000);
So all i'm doing is starting the server, not sending any messages, and after a seemingly random amount of time (2, 3, 11, or even 39 minutes) the server kills the InVM connections (or the other way around - it's hard to tell).
This only seems to happen on Windows, I cannot get this failure running in Tomcat on Linux. Any pointers would be greatly appreciated.
Many thanks,
-ian.
Message was edited by: Ian Davies: Added the fact that I'm using Guice.
-
LaunchSimple.java.zip 1.4 KB