HornetQException[errorCode=3 message=Timed out waiting to receive initial broadcast from cluster]

Solution Verified - Updated -

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.1.2

Issue

  • JBoss server throws the following exception while starting up:

ERROR [AbstractKernelController] Error installing to Start: name=jboss.esb.vfszip:/jboss-as/server/esb02/deploy/MyESB.esb/ state=Create org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception configuring action processing pipeline Caused by: org.jboss.soa.esb.ConfigurationException: Failed to configure JMS Destination for routing. at org.jboss.soa.esb.actions.routing.JMSRouter.createQueueSetup(JMSRouter.java:509) at org.jboss.soa.esb.actions.routing.JMSRouter.<init>(JMSRouter.java:290) ... 109 more Caused by: javax.jms.JMSException: Failed to create session factory .... Caused by: HornetQException[errorCode=3 message=Timed out waiting to receive initial broadcast from cluster] at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:726)

Resolution

  • Adding a multicast route to the loopback interface should resolve the issue:
sudo route add 224.0.0.0 127.0.0.1 -netmask 240.0.0.0

Root Cause

  • This issue occurs when HornetQ servers are not able to communicate with each other within a cluster. HornetQ uses discovery groups for clustering. Discovery groups uses UDP/multicast for identifying the servers in the cluster.

  • If all the nodes are residing on the same machine, then a multicast route to the loopback interface could be added. Adding this loopback address will redirect all the traffic from 224.0.0.1 to the loopback interface. This would also work if the machine is not connected to any network.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments