5 Replies Latest reply on Oct 19, 2017 8:45 AM by pmerson

    Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null

    sandeep.joseph

      Dear All,

       

      I'm trying to subscribe from a standalone HornetQ server using a simple Spring application. On the Subscriber side I get the following error while trying to connect:

       

      Could not refresh JMS Connection for destination 'com.successfactors.Employment.AssignmentInformation.Hire' - retrying using FixedBackOff{interval=5000, currentAttempts=1, maxAttempts=unlimited}. Cause: Failed to create session factory; nested exception is HornetQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT message=HQ119013: Timed out waiting to receive cluster topology. Group:null]

       

      In the HornetQ console I see the following:

       

      11:42:43,735 WARN  [org.hornetq.core.client] (hornetq-failure-check-thread) HQ212037: Connection failure has been detected: HQ119014: Did not receive data from /10.88.174.24:60505. 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=CONNECTION_TIMEDOUT]

       

      Could anyone throw some light into what is going on?

       

      Thanks,

      Sandeep Joseph

        • 1. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
          jbertram

          My first thought is that maybe you're client/server libraries are not the same version.  Can you confirm that the client jar versions match the server?

           

          Beyond that, I'd need to know more about your environment and client/server configuration.  Can you elaborate on these points?

          • 2. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
            sandeep.joseph

            Dear Justin,

             

            Thank you so much for your response. My environment is pretty simple. I run a freshly downloaded hornetq-2.2.5.Final server on an Ubuntu machine with java 1.7.0_95. And my Subscriber is very simple Spring Boot application sending a message to a destination on this server and trying to subscribe from it. This application runs on the same Ubuntu machine, basically HornetQ and the java application on the same localhost. I am attaching the Spring boot application, you can simply unzip it and build/run it as a normal Maven application.

             

            I find the same problem in my QA landscape where the HornetQ server configuration is much more complex. So I guess I'm missing something very basic.

             

            Regards,

            Sandeep

            • 3. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
              sandeep.joseph

              Hi Justin,

               

              I managed to connect using the native hornetq libraries instead of Spring. Perhaps the Spring implementation has some incompatibilities. But I guess we don't have to waste time trying to find that out for the moment. Below is the working code:

               

              I sincerely appreciate your time and effort intending to help me.

               

              Cheers,

              Sandeep

              ------------------------------------------------------------------------------------------------------------------

               

              package hornetqmessaging;

               

              import java.util.HashMap;

              import java.util.Map;

               

              import org.hornetq.api.core.TransportConfiguration;

              import org.hornetq.api.core.client.ClientConsumer;

              import org.hornetq.api.core.client.ClientMessage;

              import org.hornetq.api.core.client.ClientSession;

              import org.hornetq.api.core.client.ClientSessionFactory;

              import org.hornetq.api.core.client.HornetQClient;

              import org.hornetq.api.core.client.ServerLocator;

               

              public class MessageConsumer {

                 

                  public static void main(String[] args) throws Exception    {

                     

                      String queueName = "q_sandeep";

                     

                      //Get a session and consumer to the queue

                      ClientSession session = getClientSession();       

                      ClientConsumer cc = session.createConsumer(queueName);

                      session.start();

                      String message;

                     

                      do    {

                         

                          //Blocking receive

                          System.out.println("Waiting (Blocked) for message from " + queueName);

                          ClientMessage received = cc.receive();

                          received.acknowledge();

                          message = received.getBodyBuffer().readString();

                          System.out.println("Received a message from " + queueName + ": " + message);

                      }

                      while(!"stop".equalsIgnoreCase(message));

                             

                      session.close();       

                  }

                 

                  private static ClientSession getClientSession() throws Exception    {

                     

                      System.out.println("Initiating connection...");

                      Map<String, Object> connectionParams = new HashMap<String, Object>();

                      connectionParams.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME, 5445);

                      connectionParams.put(org.hornetq.core.remoting.impl.netty.TransportConstants.HOST_PROP_NAME, "10.97.154.143");

                      TransportConfiguration transportConfiguration = new TransportConfiguration(org.hornetq.core.remoting.impl.netty.NettyConnectorFactory.class.getCanonicalName(), connectionParams);

               

                      ServerLocator loc = HornetQClient.createServerLocatorWithoutHA(transportConfiguration);

                      ClientSessionFactory sessionFactory = loc.createSessionFactory(transportConfiguration);

               

                      System.out.println("Session Factory Created: " + sessionFactory.toString());

                      return sessionFactory.createSession(true, true);       

                  }   

              }

              • 4. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
                jbertram

                I ran the test in the project you attached and it looks to me like the HornetQ broker simply isn't configured properly to support connections on port 5445.  However, I'm not familiar enough with the Spring Boot integration with HornetQ to tell you what you need to do to fix it.

                • 5. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
                  pmerson

                  I had the same problem.

                  Specifically, I was trying to get a Spring Boot (version 1.4.1) application to send a message to HornetQ Server version 2.3.25.SP13 (embedded on a JBoss 6.4.10 server).

                  The solution was to add the following dependency to my Spring Boot application:

                          <dependency>

                              <groupId>org.hornetq</groupId>

                              <artifactId>hornetq-jms-client</artifactId>

                              <version>2.3.22.Final</version>

                          </dependency>