5 Replies Latest reply on Feb 21, 2013 9:12 AM by Andy Taylor

    Connection failure has been detected: Did not receive data

    Marek Neumann Novice

      We are struggling with the failure message on the server (2.2.16.Final):

       

      WARN  [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] (hornetq-failure-check-thread) Connection failure has been detected: Did not receive data from /10.35.29.29:34289. 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]

      10:58:15,689 WARN  [org.hornetq.core.server.impl.ServerSessionImpl] (hornetq-failure-check-thread) Client connection failed, clearing up resources for session 40773804-7c0d-11e2-80fd-93fc8a349d49

      10:58:15,692 WARN  [org.hornetq.core.server.impl.ServerSessionImpl] (hornetq-failure-check-thread) Cleared up resources for session 40773804-7c0d-11e2-80fd-93fc8a349d49

      10:58:15,693 WARN  [org.hornetq.core.server.impl.ServerSessionImpl] (hornetq-failure-check-thread) Client connection failed, clearing up resources for session 407aba75-7c0d-11e2-80fd-93fc8a349d49

      10:58:15,693 WARN  [org.hornetq.core.server.impl.ServerSessionImpl] (hornetq-failure-check-thread) Cleared up resources for session 407aba75-7c0d-11e2-80fd-93fc8a349d49

      10:58:15,694 WARN  [org.hornetq.core.server.impl.ServerSessionImpl] (hornetq-failure-check-thread) Client connection failed, clearing up resources for session 407e3ce6-7c0d-11e2-80fd-93fc8a349d49

      10:58:15,694 WARN  [org.hornetq.core.server.impl.ServerSessionImpl] (hornetq-failure-check-thread) Cleared up resources for session 407e3ce6-7c0d-11e2-80fd-93fc8a349d49

       

      This message occurs again and again with the same session ids.

       

      All JMS resources are closed from the client side (message producer, session, connection):

       

      // retrieve XA cf from JNDI

      ConnectionFactory cf = ....

      try {

        // send message

      } finally {

           if (queueSender != null) {

               queueSender.close();

           }

           if (session != null) {

              session.close();

           }

           if (connection != null) {

              connection.close();

           }

      }

       

      I wonder if this happens only because a pooled managed connection is used from the client (JMS Resource Adaptor, HornetQRAManagedConnection, HornetQRASession). I have tried several things:

       

      <config-property>

          <description>The client failure check period</description>

          <config-property-name>ClientFailureCheckPeriod</config-property-name>

          <config-property-type>java.lang.Long</config-property-type>

          <config-property-value>-1</config-property-value>

      </config-property>

      <config-property>

          <description>The connection TTL</description>

          <config-property-name>ConnectionTTL</config-property-name>

          <config-property-type>java.lang.Long</config-property-type>

          <config-property-value>-1</config-property-value>

      </config-property>

       

      Nothing helped. When a new connection is established from the client (verified that using lsof and netstat), this connection times out after some time giving the WARN message.

       

      The connection factory looks like this:

      <tx-connection-factory>

          <jndi-name>HornetqPooledConnectionFactory</jndi-name>

          <xa-transaction/>

          <rar-name>hornetq-ra.rar</rar-name>

          <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>

          <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>

          <config-property name="ConnectionParameters" type="java.lang.String">$CONNECTION$</config-property>

          <config-property name="ConnectorClassName" type="java.lang.String">org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property>

          <max-pool-size>100</max-pool-size>

      </tx-connection-factory>

       

      Thanks,

      Marek