7 Replies Latest reply on Aug 18, 2017 3:03 AM by Miroslav Novak

    JMS replication in Wildfly 10

    Hardy Ferentschik Novice

      Hi,

       

      I am trying to setup JMS replication between two Wildfly 10 (10.0.0.Beta1) nodes. I get the two nodes to find each other and also synchronize. I can also shit down the master node and see the backup node taking over. However, when I then try to restart the initial server, I would expect to see a fail-back, but I keep getting continuously in both nodes:

       

      01:47:53,726 WARN  [org.apache.activemq.artemis.core.client] (activemq-discovery-group-thread-dg-group1) AMQ212034: There are more than one servers on the network broadcasting the same node id. You will see this message exactly once (per node) if a node is restarted, in which case it can be safely ignored. But if it is logged continuously it means you really do have more than one node on the same network active concurrently with the same node id. This could occur if you have a backup node active at the same time as its live node. nodeID=d61d6d25-41ef-11e5-aacc-8f26f5d68b45

       

      Here is my live node config:

       

      <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
          <server name="default">
              <cluster user="foo" password="bar"/>
              <security-setting name="#">
                  <role name="guest" delete-non-durable-queue="true"non-durable-queue="true" consume="true" send="true"/>
              </security-setting>
              <address-setting name="#" redistribution-delay="1000" counter-history-day-limit="10" page-size-bytes="20971size-bytes="10485760" expiry-address="jms.queue.Expirdead-letter-address="jms.queue.DLQ"/>
              <http-connector name="http-connector" socket-binding="http">
                  <param name="http-upgrade-endpoint" value="http-acceptor"/>
              </http-connector>
              <http-connector name="http-connector-throughput" socket-"http">
                  <param name="http-upgrade-endpoint" value="http-athroughput"/>
                  <param name="batch-delay" value="50"/>
              </http-connector>
              <in-vm-connector name="in-vm" server-id="0"/>
              <http-acceptor name="http-acceptor" http-listener="default"/>
              <http-acceptor name="http-acceptor-throughput" http-lidefault">
                  <param name="batch-delay" value="50"/>
                  <param name="direct-deliver" value="false"/>
              </http-acceptor>
              <in-vm-acceptor name="in-vm" server-id="0"/>
              <broadcast-group name="bg-group1" connectors="http-conjgroups-channel="activemq-cluster" jgroups-stack="udp"/>
              <discovery-group name="dg-group1" jgroups-channel="acluster" jgroups-stack="udp"/>
              <cluster-connection name="my-cluster" discovery-group="d" connector-name="http-connector" address="jms"/>
              <jms-queue name="ExpiryQueue" entries="java:/jmExpiryQueue"/>
              <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
              <replication-master/>
              <connection-factory name="InVmConnectionFactory" entriesConnectionFactory" connectors="in-vm"/>
              <connection-factory name="RemoteConnectionFactory" reattempts="-1" block-on-acknowledge="true" ha="true" ejava:jboss/exported/jms/RemoteConnectionFactory" connhttp-connector"/>
              <pooled-connection-factory name="activemq-ra" transactientries="java:/JmsXA java:jboss/DefaultJMSConnectionFconnectors="in-vm"/>
          </server>
      </subsystem>
      

       

      Here is the backup node config:

       

      <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
          <server name="default">
              <cluster user="foo" password="bar"/>
              <security-setting name="#">
                  <role name="guest" delete-non-durable-queue="true"non-durable-queue="true" consume="true" send="true"/>
              </security-setting>
              <address-setting name="#" redistribution-delay="1000" counter-history-day-limit="10" page-size-bytes="20971size-bytes="10485760" expiry-address="jms.queue.Expirdead-letter-address="jms.queue.DLQ"/>
              <http-connector name="http-connector" socket-binding="http">
                  <param name="http-upgrade-endpoint" value="http-acceptor"/>
              </http-connector>
              <http-connector name="http-connector-throughput" socket-"http">
                  <param name="http-upgrade-endpoint" value="http-athroughput"/>
                  <param name="batch-delay" value="50"/>
              </http-connector>
              <in-vm-connector name="in-vm" server-id="0"/>
              <http-acceptor name="http-acceptor" http-listener="default"/>
              <http-acceptor name="http-acceptor-throughput" http-lidefault">
                  <param name="batch-delay" value="50"/>
                  <param name="direct-deliver" value="false"/>
              </http-acceptor>
              <in-vm-acceptor name="in-vm" server-id="0"/>
              <broadcast-group name="bg-group1" connectors="http-conjgroups-channel="activemq-cluster" jgroups-stack="udp"/>
              <discovery-group name="dg-group1" jgroups-channel="acluster" jgroups-stack="udp"/>
              <cluster-connection name="my-cluster" discovery-group="d" connector-name="http-connector" address="jms"/>
              <jms-queue name="ExpiryQueue" entries="java:/jmExpiryQueue"/>
              <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
              <replication-slave allow-failback="true"/>
              <connection-factory name="InVmConnectionFactory" entriesConnectionFactory" connectors="in-vm"/>
              <connection-factory name="RemoteConnectionFactory" reattempts="-1" block-on-acknowledge="true" ha="true" ejava:jboss/exported/jms/RemoteConnectionFactory" connhttp-connector"/>
              <pooled-connection-factory name="activemq-ra" transactientries="java:/JmsXA java:jboss/DefaultJMSConnectionFconnectors="in-vm"/>
          </server>
      </subsystem>
      

       

      In replication-slave I am setting 'allow-failback'. I tried to also specify 'check-for-live-server', but then the cluster would not start up. The master log would contain:

       

      01:54:07,118 WARNING [org.jgroups.JChannel] (ServerService Thread Pool -- 70) %s: receiver already set

      01:54:07,118 WARN  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ222116: unable to start broadcast group bg-group1: java.lang.IllegalStateException: channel is closed

          at org.jgroups.JChannel.checkClosed(JChannel.java:959)

          at org.jgroups.JChannel._preConnect(JChannel.java:548)

          at org.jgroups.JChannel.connect(JChannel.java:288)

          at org.jgroups.JChannel.connect(JChannel.java:279)

          at org.apache.activemq.artemis.api.core.JGroupsBroadcastEndpoint$JChannelWrapper.connect(JGroupsBroadcastEndpoint.java:211)

          at org.apache.activemq.artemis.api.core.JGroupsBroadcastEndpoint.internalOpen(JGroupsBroadcastEndpoint.java:115)

          at org.apache.activemq.artemis.api.core.JGroupsBroadcastEndpoint.openBroadcaster(JGroupsBroadcastEndpoint.java:101)

          at org.apache.activemq.artemis.core.server.cluster.impl.BroadcastGroupImpl.start(BroadcastGroupImpl.java:105)

          at org.apache.activemq.artemis.core.server.cluster.ClusterManager.start(ClusterManager.java:288)

          at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart2(ActiveMQServerImpl.java:1904)

          at org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation.run(SharedNothingLiveActivation.java:104)

          at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:416)

          at org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:414)

          at org.wildfly.extension.messaging.activemq.jms.JMSService.doStart(JMSService.java:173)

          at org.wildfly.extension.messaging.activemq.jms.JMSService.access$000(JMSService.java:60)

          at org.wildfly.extension.messaging.activemq.jms.JMSService$1.run(JMSService.java:94)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

          at java.util.concurrent.FutureTask.run(FutureTask.java:266)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

          at java.lang.Thread.run(Thread.java:745)

          at org.jboss.threads.JBossThread.run(JBossThread.java:320)

       

      Any idea what's wrong. Is the configuration not correct? Is replication already working in this version of Artemis and its integration into Wildfly? Or are my expectations on how fail-over and successive fail-back are supposed to work wrong?

       

      Last but not least, is there a dedicated Artemis forum?

       

      Thanks!