Hi Justin,

After spending hours of reading through documentation and examples I finally
decided to
continue with the replication/colocate approach.

So I've started two brokers which should pair with each other using static
connectors.


    <ha-policy>
      <replication>
        <colocated>
          <request-backup>true</request-backup>
          <max-backups>1</max-backups>
          <backup-request-retries>-1</backup-request-retries>
         
<backup-request-retry-interval>5000</backup-request-retry-interval>
          <master>
            <check-for-live-server>true</check-for-live-server>
          </master>
          <slave>
             <allow-failback>true</allow-failback>
          </slave>
        </colocated>
      </replication>
    </ha-policy>

    <cluster-connections>
      <cluster-connection name="my-cluster">
        <address></address>
        <connector-ref>netty-connector</connector-ref>
        <check-period>1000</check-period>
        <connection-ttl>5000</connection-ttl>
        <min-large-message-size>50000</min-large-message-size>
        <call-timeout>5000</call-timeout>
        <retry-interval>500</retry-interval>
        <retry-interval-multiplier>1.0</retry-interval-multiplier>
        <max-retry-interval>5000</max-retry-interval>
        <initial-connect-attempts>-1</initial-connect-attempts>
        <reconnect-attempts>-1</reconnect-attempts>
        <use-duplicate-detection>true</use-duplicate-detection>
        <message-load-balancing>ON_DEMAND</message-load-balancing>
        <max-hops>1</max-hops>
        <confirmation-window-size>32000</confirmation-window-size>
        <call-failover-timeout>30000</call-failover-timeout>
        <notification-interval>1000</notification-interval>
        <notification-attempts>2</notification-attempts>
        <static-connectors>
          <connector-ref>cluster-connector</connector-ref>
        </static-connectors>
      </cluster-connection>
    </cluster-connections>

    <connectors>
      <connector name="netty-connector">tcp://10.0.1.109:61616</connector>   
      <connector name="cluster-connector">tcp://10.0.1.111:61616</connector>
    </connectors>


Both servers find each other and request backup is also successful, e.g

2018-04-26 06:51:19,387 INFO  [org.apache.activemq.artemis.core.server]
AMQ221027: Bridge ClusterConnectionBridge@4af78b15 [...] is connected
2018-04-26 06:51:23,258 INFO  [org.apache.activemq.artemis.core.server]
AMQ221066: Initiating quorum vote: RequestBackupQuorumVote
2018-04-26 06:51:23,271 INFO  [org.apache.activemq.artemis.core.server]
AMQ221060: Sending quorum vote request to 10.0.1.111/10.0.1.111:61616:
RequestBackupVote [backupsSize=-1, nodeID=null, backupAvailable=false]
2018-04-26 06:51:23,277 INFO  [org.apache.activemq.artemis.core.server]
AMQ221061: Received quorum vote response from 10.0.1.111/10.0.1.111:61616:
RequestBackupVote [backupsSize=0,
nodeID=3691529e-491e-11e8-a0d4-0242ac120006, backupAvailable=true]
2018-04-26 06:51:23,795 INFO  [org.apache.activemq.artemis.core.server]
AMQ221062: Received quorum vote request: RequestBackupVote [backupsSize=-1,
nodeID=null, backupAvailable=false]
2018-04-26 06:51:23,795 INFO  [org.apache.activemq.artemis.core.server]
AMQ221063: Sending quorum vote response: RequestBackupVote [backupsSize=0,
nodeID=36502b14-491e-11e8-9a28-0242ac120006, backupAvailable=true]
2018-04-26 06:51:23,952 INFO  [org.apache.activemq.artemis.core.server]
AMQ221000: backup Message Broker is starting with configuration Broker
Configuration
(clustered=true,journalDirectory=data/journalcolocated_backup_01,bindingsDirectory=data/bindingscolocated_backup_01,largeMessagesDirectory=data/large-messagescolocated_backup_01,pagingDirectory=data/pagingcolocated_backup_01)

I then stop the second server and start it anew. The cluster connects but
backup fails, e.g.

2018-04-26 06:57:02,134 WARN  [org.apache.activemq.artemis.core.client]
AMQ212037: Connection failure has been detected: AMQ119015: The connection
was disconnected because of server shutdown [code=DISCONNECTED]
2018-04-26 06:57:02,138 WARN  [org.apache.activemq.artemis.core.server]
AMQ222095: Connection failed with failedOver=false
2018-04-26 06:57:02,138 WARN  [org.apache.activemq.artemis.core.client]
AMQ212037: Connection failure has been detected: AMQ119015: The connection
was disconnected because of server shutdown [code=DISCONNECTED]
2018-04-26 06:57:02,139 WARN  [org.apache.activemq.artemis.core.client]
AMQ212037: Connection failure has been detected: AMQ119015: The connection
was disconnected because of server shutdown [code=DISCONNECTED]
2018-04-26 06:57:02,273 INFO  [org.apache.activemq.artemis.core.server]
AMQ221029: stopped bridge
$.artemis.internal.sf.fleeture.3691529e-491e-11e8-a0d4-0242ac120006
2018-04-26 06:57:02,276 WARN  [org.apache.activemq.artemis.core.server]
AMQ222095: Connection failed with failedOver=false
2018-04-26 06:57:22,240 INFO  [org.apache.activemq.artemis.core.server]
AMQ221062: Received quorum vote request: RequestBackupVote [backupsSize=-1,
nodeID=null, backupAvailable=false]
2018-04-26 06:57:22,240 INFO  [org.apache.activemq.artemis.core.server]
AMQ221063: Sending quorum vote response: RequestBackupVote [backupsSize=1,
nodeID=36502b14-491e-11e8-9a28-0242ac120006, backupAvailable=false]
2018-04-26 06:57:22,903 INFO  [org.apache.activemq.artemis.core.server]
AMQ221027: Bridge ClusterConnectionBridge@6b293748 [...] is connected
2018-04-26 06:57:27,295 INFO  [org.apache.activemq.artemis.core.server]
AMQ221062: Received quorum vote request: RequestBackupVote [backupsSize=-1,
nodeID=null, backupAvailable=false]
2018-04-26 06:57:27,296 INFO  [org.apache.activemq.artemis.core.server]
AMQ221063: Sending quorum vote response: RequestBackupVote [backupsSize=1,
nodeID=36502b14-491e-11e8-9a28-0242ac120006, backupAvailable=false]
2018-04-26 06:57:32,311 INFO  [org.apache.activemq.artemis.core.server]
AMQ221062: Received quorum vote request: RequestBackupVote [backupsSize=-1,
nodeID=null, backupAvailable=false]
2018-04-26 06:57:32,311 INFO  [org.apache.activemq.artemis.core.server]
AMQ221063: Sending quorum vote response: RequestBackupVote [backupsSize=1,
nodeID=36502b14-491e-11e8-9a28-0242ac120006, backupAvailable=false]
...

The second server (which was restarted) is after connecting to cluster
continuesly posting:

2018-04-26 06:57:27,286 INFO  [org.apache.activemq.artemis.core.server]
AMQ221066: Initiating quorum vote: RequestBackupQuorumVote
2018-04-26 06:57:27,294 INFO  [org.apache.activemq.artemis.core.server]
AMQ221060: Sending quorum vote request to 10.0.1.109/10.0.1.109:61616:
RequestBackupVote [backupsSize=-1, nodeID=null, backupAvailable=false]
2018-04-26 06:57:27,297 INFO  [org.apache.activemq.artemis.core.server]
AMQ221061: Received quorum vote response from 10.0.1.109/10.0.1.109:61616:
RequestBackupVote [backupsSize=1,
nodeID=36502b14-491e-11e8-9a28-0242ac120006, backupAvailable=false]

The whole scenario only stablizis if I restart the first server aswell (but
I doubt that it will recover from backup, instead it will ask the second
server for a new backup).

Why does colocation doesnt't work here? Is this a configuration issue?

A short notice. The whole scenario runs on docker. So after a restart each
server gets a new IP address. 
This issue looks similar to what Ikka described in
http://activemq.2283324.n4.nabble.com/Artemis-2-5-0-Problems-with-colocated-scaledown-td4737583.html
but has never been commented and in my scenario it doesn't matter wether I
use UDP broadcasts or static connectors.

Thank you for any help,

Archibald



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply via email to