Artemis broker is not announcing itself as backup on RHEL machine

119 Views Asked by At

I have 5 Red Hat Enterprise Linux (RHEL) 7.7 system with ActiveMQ Artemis brokers installed on each of them. I have configured 1 master and the rest as slaves. The snippet of broker.xml for the master broker is as follows:

<connectors>
   <connector name="mainBrokerConnector">tcp://10.1.144.200:61616</connector>
</connectors>

<discovery-groups>
   <discovery-group name="my-discovery-group">
      <local-bind-address>10.1.144.200</local-bind-address>
      <group-address>231.7.7.7</group-address>
      <group-port>9876</group-port>
      <refresh-timeout>10000</refresh-timeout>
   </discovery-group>
</discovery-groups>
 
<cluster-connections>
   <cluster-connection name="my-cluster">
      <connector-ref>mainBrokerConnector</connector-ref>
      <retry-interval>500</retry-interval>
      <use-duplicate-detection>true</use-duplicate-detection>
       <message-load-balancing>STRICT</message-load-balancing>
      <max-hops>1</max-hops>
      <discovery-group-ref discovery-group-name="my-discovery-group"/>
   </cluster-connection>
</cluster-connections>

<broadcast-groups>
   <broadcast-group name="my-broadcast-group">
      <local-bind-address>10.1.144.200</local-bind-address>
      <local-bind-port>5432</local-bind-port>
      <group-address>231.7.7.7</group-address>
      <group-port>9876</group-port>
      <broadcast-period>2000</broadcast-period>
      <connector-ref>mainBrokerConnector</connector-ref>
   </broadcast-group>
</broadcast-groups>

<ha-policy>
   <replication>
      <master>
        <check-for-live-server>true</check-for-live-server>
      </master>
   </replication>
</ha-policy>

Three of the four backup brokers when started (./artemis run) announce themselves as backups. In the logs of the backup brokers I see something like this (hence I know that they are in sync):

2020-10-07 14:19:43,480 INFO  [org.apache.activemq.artemis.core.server] AMQ221024: Backup server ActiveMQServerImpl::serverUUID=e2fbfd28-04ec-11eb-b49a-005056aded6a is synchronized with live-server.
2020-10-07 14:19:43,768 INFO  [org.apache.activemq.artemis.core.server] AMQ221031: backup announced

However, the fourth broker starts but does not logs anything about syncing. The broker.xml snippet of the fourth broker is as follows

<connectors>
   <connector name="brokerTwoConnector">tcp://10.1.144.202:61616</connector>
</connectors>

<discovery-groups>
   <discovery-group name="my-discovery-group">
      <local-bind-address>10.1.144.202</local-bind-address>
      <group-address>231.7.7.7</group-address>
      <group-port>9876</group-port>
      <refresh-timeout>10000</refresh-timeout>
   </discovery-group>
</discovery-groups>

<cluster-connections>
   <cluster-connection name="my-cluster">
      <connector-ref>brokerTwoConnector</connector-ref>
      <retry-interval>500</retry-interval>
      <use-duplicate-detection>true</use-duplicate-detection>
      <message-load-balancing>STRICT</message-load-balancing>
      <max-hops>1</max-hops>
      <discovery-group-ref discovery-group-name="my-discovery-group"/>
   </cluster-connection>
</cluster-connections>

<broadcast-groups>
   <broadcast-group name="my-broadcast-group">
      <local-bind-address>10.1.144.202</local-bind-address>
      <local-bind-port>5432</local-bind-port>
      <group-address>231.7.7.7</group-address>
      <group-port>9876</group-port>
      <broadcast-period>2000</broadcast-period>
      <connector-ref>brokerTwoConnector</connector-ref>
   </broadcast-group>
</broadcast-groups>

<ha-policy>
   <replication>
      <slave>
        <allow-failback>true</allow-failback>
      </slave>
   </replication>
</ha-policy>

Rest of the slave brokers have the same configuration except different host IP addresses and connector names. So what is not configured properly that this broker is not syncing with the master broker?

EDIT

When I start the culprit broker then following logs appear which shows that its part of a cluster:

2020-10-07 16:10:15,525 INFO  [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
2020-10-07 16:10:15,572 INFO  [org.apache.activemq.artemis.core.server] AMQ221000: backup Message Broker is starting with configuration Broker Configuration (clustered=true,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2020-10-07 16:10:15,598 INFO  [org.apache.activemq.artemis.core.server] AMQ222162: Moving data directory /opt/brokerTwo/brokerTwo/data/journal to /opt/brokerTwo/brokerTwo/data/journal/oldreplica.2
2020-10-07 16:10:15,631 INFO  [org.apache.activemq.artemis.core.server] AMQ221012: Using AIO Journal
2020-10-07 16:10:15,740 WARN  [org.apache.activemq.artemis.core.server] AMQ222007: Security risk! Apache ActiveMQ Artemis is running with the default cluster admin user and default password. Please see the cluster chapter in the ActiveMQ Artemis User Guide for instructions on how to change this.
2020-10-07 16:10:15,749 INFO  [org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 1,073,741,824
2020-10-07 16:10:15,964 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
2020-10-07 16:10:15,966 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
2020-10-07 16:10:15,967 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
2020-10-07 16:10:15,968 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
2020-10-07 16:10:15,968 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
2020-10-07 16:10:15,969 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
2020-10-07 16:10:16,203 INFO  [org.apache.activemq.hawtio.branding.PluginContextListener] Initialized activemq-branding plugin
2020-10-07 16:10:16,279 INFO  [org.apache.activemq.hawtio.plugin.PluginContextListener] Initialized artemis-plugin plugin
2020-10-07 16:10:17,173 INFO  [io.hawt.HawtioContextListener] Initialising hawtio services
2020-10-07 16:10:17,201 INFO  [io.hawt.system.ConfigManager] Configuration will be discovered via system properties
2020-10-07 16:10:17,205 INFO  [io.hawt.jmx.JmxTreeWatcher] Welcome to hawtio 1.5.5 : http://hawt.io/ : Don't cha wish your console was hawt like me? ;-)
2020-10-07 16:10:17,210 INFO  [io.hawt.jmx.UploadManager] Using file upload directory: /opt/brokerTwo/brokerTwo/tmp/uploads
2020-10-07 16:10:17,239 INFO  [io.hawt.web.AuthenticationFilter] Starting hawtio authentication filter, JAAS realm: "activemq" authorized role(s): "amq" role principal classes: "org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal"
2020-10-07 16:10:17,293 INFO  [io.hawt.web.JolokiaConfiguredAgentServlet] Jolokia overridden property: [key=policyLocation, value=file:/opt/brokerTwo/brokerTwo/etc/jolokia-access.xml]
2020-10-07 16:10:17,355 INFO  [io.hawt.web.RBACMBeanInvoker] Using MBean [hawtio:type=security,area=jmx,rank=0,name=HawtioDummyJMXSecurity] for role based access control
0

There are 0 best solutions below