Error AMQ212064: Unable to receive cluster topology

Solution Verified - Updated -

Issue

  • This exception appears when, on a shared storage A_MQ cluster, the slave is live and the master is trying to take over the lead again, but it hangs and takes a lot of time to succeed:
 WARN  [org.apache.activemq.artemis.core.server] AMQ222002: Timed out waiting for pool to terminate org.apache.activemq.artemis.utils.ActiveMQThreadPoolExecutor@4fe9c748[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 612]. Interrupting all its threads
WARN  [org.apache.activemq.artemis.core.client] AMQ212064: Unable to receive cluster topology : java.lang.InterruptedException
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1039) [rt.jar:1.8.0_282]
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1328) [rt.jar:1.8.0_282]
    at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:277) [rt.jar:1.8.0_282]
    at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.waitForTopology(ClientSessionFactoryImpl.java:489) [artemis-core-client-2.9.0.redhat-00018.jar:2.9.0.redhat-00018]
    at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:751) [artemis-core-client-2.9.0.redhat-00018.jar:2.9.0.redhat-00018]
    at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:546) [artemis-core-client-2.9.0.redhat-00018.jar:2.9.0.redhat-00018]
    at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:525) [artemis-core-client-2.9.0.redhat-00018.jar:2.9.0.redhat-00018]
    at org.apache.activemq.artemis.core.server.cluster.ClusterController$ConnectRunnable.run(ClusterController.java:431) [artemis-server-2.9.0.redhat-00018.jar:2.9.0.redhat-00018]
    at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.9.0.redhat-00018.jar:2.9.0.redhat-00018]
    at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.9.0.redhat-00018.jar:2.9.0.redhat-00018]
    at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) [artemis-commons-2.9.0.redhat-00018.jar:2.9.0.redhat-00018]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_282]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_282]
    at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.9.0.redhat-00018.jar:2.9.0.redhat-00018]

Environment

  • A-MQ 7.x
  • Shared storage
  • Master and Slave pair cluster
  • UDP-based dynamic discovery, like the following, on file broker.xml
      <broadcast-groups>
         <broadcast-group name="my-broadcast-group">
            <group-address>231.7.7.7</group-address>
            <group-port>9898</group-port>
            <broadcast-period>5000</broadcast-period>
            <connector-ref>my-connector</connector-ref>
         </broadcast-group>
      </broadcast-groups>

      <discovery-groups>
         <discovery-group name="my-discovery-group">
            <group-address>231.7.7.7</group-address>
            <group-port>9898</group-port>
            <refresh-timeout>10000</refresh-timeout>
         </discovery-group>
     </discovery-groups>

      <network-check-list>[masterip,slaveip]</network-check-list>   
      <network-check-period>5000</network-check-period>
      <network-check-timeout>1000</network-check-timeout>
      <network-check-ping-command>ping -c 1 -t %d %s</network-check-ping-command>
      <network-check-ping6-command>ping6 -c 1 %2$s</network-check-ping6-command>

      <cluster-connections>
         <cluster-connection name="my-cluster">
            <connector-ref>my-connector</connector-ref>
            <message-load-balancing>ON_DEMAND</message-load-balancing>
            <max-hops>0</max-hops>
            <discovery-group-ref discovery-group-name="my-discovery-group"/>
         </cluster-connection>
      </cluster-connections>

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content