activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Bertram <jbert...@apache.org>
Subject Re: Artemis 2.0 cluster fail over issue
Date Fri, 12 May 2017 16:14:41 GMT
> Quick question how does the cluster know when a master fails is the a ping if so what
port does that use?

Once the live and backup brokers discover each other they connect to each other via TCP. When
that TCP connection breaks the backup essentially knows the live is dead.


Your <discovery-group> and <broadcast-group> are configured to use UDP multicast.
Is that supported in your cloud environment?


Justin

----- Original Message -----
From: "mtod" <mtod@thetods.net>
To: users@activemq.apache.org
Sent: Friday, May 12, 2017 10:47:55 AM
Subject: Re: Artemis 2.0 cluster fail over issue

Thanks for the response.


3 systems running on AWS Windows 2016 

I just trimed it down removing any SSL until I can get this working.
I followed the
https://github.com/apache/activemq-artemis/tree/master/examples/features/ha/replicated-transaction-failover
example.

Quick question how does the cluster know when a master fails is the a ping
if so what port does that use?

Thanks for looking at this.

Mike

Server1 - Master

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="urn:activemq
/schema/artemis-configuration.xsd">

   <core xmlns="urn:activemq:core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="urn:activemq:core ">

      <name>fmibroker</name>

      <persistence-enabled>true</persistence-enabled>
	  
	  
	  <jmx-management-enabled>true</jmx-management-enabled>

      
      <journal-type>NIO</journal-type>

      <paging-directory>./data/paging</paging-directory>

      <bindings-directory>./data/bindings</bindings-directory>

      <journal-directory>./data/journal</journal-directory>

     
<large-messages-directory>./data/large-messages</large-messages-directory>

      <journal-datasync>true</journal-datasync>

      <journal-min-files>2</journal-min-files>

      <journal-pool-files>-1</journal-pool-files>

      

      

      
      

      
      

      
      

      
      



      
      <journal-buffer-timeout>1488000</journal-buffer-timeout>

    <connectors>
        
        <connector
name="netty_connector">tcp://10.121.51.121:61616</connector>	
    </connectors>

      
      <disk-scan-period>5000</disk-scan-period>

      
      <max-disk-usage>90</max-disk-usage>

      
      <global-max-size>100Mb</global-max-size>

      <acceptors>
         
         <acceptor
name="netty_acceptor">tcp://10.121.51.121:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE</acceptor>

      </acceptors>

      <cluster-user>xxxxx</cluster-user>
      <cluster-password>xxxxx</cluster-password>

      <broadcast-groups>
         <broadcast-group name="bg-group1">
            <group-address>${udp-address:231.7.7.7}</group-address>
            <group-port>9876</group-port>
            <broadcast-period>5000</broadcast-period>
            <connector-ref>netty_connector</connector-ref>
         </broadcast-group>
      </broadcast-groups>

      <discovery-groups>
         <discovery-group name="dg-group1">
            <group-address>${udp-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="fmieastcluster">
			
            <connector-ref>netty_connector</connector-ref>
			<retry-interval>1000</retry-interval>
            <message-load-balancing>ON_DEMAND</message-load-balancing>
            <max-hops>1</max-hops>
            <discovery-group-ref discovery-group-name="dg-group1"/> 
         </cluster-connection>
      </cluster-connections>

      <ha-policy>
         <replication>
            <master>
				<cluster-name>fmieastcluster</cluster-name>
				<group-name>useast</group-name>				
				<check-for-live-server>true</check-for-live-server>
			</master>
         </replication>
      </ha-policy>

	  <management-address>jms.queue.activemq.management</management-address>
	  
      <security-settings>
		
		
		
		<security-setting match="jms.queue.activemq.management">
			<permission type="manage" roles="admin" />
		</security-setting>
	  
         <security-setting match="#">
            <permission type="createNonDurableQueue" roles="admin"/>
            <permission type="deleteNonDurableQueue" roles="admin"/>
            <permission type="createDurableQueue" roles="admin"/>
            <permission type="deleteDurableQueue" roles="admin"/>
            <permission type="createAddress" roles="admin"/>
            <permission type="deleteAddress" roles="admin"/>
            <permission type="consume" roles="admin"/>
            <permission type="browse" roles="admin"/>
            <permission type="send" roles="admin"/>
            
            <permission type="manage" roles="admin"/>
         </security-setting>
      </security-settings>

      <address-settings>
         
         <address-setting match="activemq.management#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
         
         <address-setting match="#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
      </address-settings>

      <addresses>
         <address name="DLQ">
            <anycast>
               <queue name="DLQ" />
            </anycast>
         </address>
         <address name="ExpiryQueue">
            <anycast>
               <queue name="ExpiryQueue" />
            </anycast>
         </address>

      </addresses>

   </core>
</configuration>




Server2 - Slave

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="urn:activemq
/schema/artemis-configuration.xsd">

   <core xmlns="urn:activemq:core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="urn:activemq:core ">

      <name>fmibroker</name>

      <persistence-enabled>true</persistence-enabled>
	  
	  
	  <jmx-management-enabled>true</jmx-management-enabled>

      
      <journal-type>NIO</journal-type>

      <paging-directory>./data/paging</paging-directory>

      <bindings-directory>./data/bindings</bindings-directory>

      <journal-directory>./data/journal</journal-directory>

     
<large-messages-directory>./data/large-messages</large-messages-directory>

      <journal-datasync>true</journal-datasync>

      <journal-min-files>2</journal-min-files>

      <journal-pool-files>-1</journal-pool-files>

      

      

      
      

      
      

      
      

      
      

      
      <journal-buffer-timeout>1364000</journal-buffer-timeout>

    <connectors>
        
        <connector
name="netty_connector">tcp://10.121.49.225:61616</connector>
	</connectors>

      
      <disk-scan-period>5000</disk-scan-period>

      
      <max-disk-usage>90</max-disk-usage>

      
      <global-max-size>100Mb</global-max-size>

      <acceptors>
         
         <acceptor
name="netty_acceptor">tcp://10.121.49.225:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE</acceptor>
      </acceptors>

      <cluster-user>xxxxx</cluster-user>
      <cluster-password>xxxxx</cluster-password>

      <broadcast-groups>
         <broadcast-group name="bg-group1">
            <group-address>${udp-address:231.7.7.7}</group-address>
            <group-port>9876</group-port>
            <broadcast-period>5000</broadcast-period>
            <connector-ref>netty_connector</connector-ref>
         </broadcast-group>
      </broadcast-groups>

      <discovery-groups>
         <discovery-group name="dg-group1">
            <group-address>${udp-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="fmieastcluster">
			
            <connector-ref>netty_connector</connector-ref>
			<retry-interval>1000</retry-interval>
            <message-load-balancing>ON_DEMAND</message-load-balancing>
            <max-hops>1</max-hops>
            <discovery-group-ref discovery-group-name="dg-group1"/> 
         </cluster-connection>
      </cluster-connections>

      <ha-policy>
         <replication>
            <slave>
				<cluster-name>fmieastcluster</cluster-name>
				<group-name>useast</group-name>						
				<allow-failback>true</allow-failback>
			</slave>
         </replication>
      </ha-policy>

      <security-settings>
	    		<security-setting match="jms.queue.hornetq.management">
			<permission type="manage" roles="admin" />
		</security-setting>

         <security-setting match="#">
            <permission type="createNonDurableQueue" roles="admin"/>
            <permission type="deleteNonDurableQueue" roles="admin"/>
            <permission type="createDurableQueue" roles="admin"/>
            <permission type="deleteDurableQueue" roles="admin"/>
            <permission type="createAddress" roles="admin"/>
            <permission type="deleteAddress" roles="admin"/>
            <permission type="consume" roles="admin"/>
            <permission type="browse" roles="admin"/>
            <permission type="send" roles="admin"/>
            
            <permission type="manage" roles="admin"/>
         </security-setting>
      </security-settings>

      <address-settings>
         
         <address-setting match="activemq.management#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
         
         <address-setting match="#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
      </address-settings>

      <addresses>
         <address name="DLQ">
            <anycast>
               <queue name="DLQ" />
            </anycast>
         </address>
         <address name="ExpiryQueue">
            <anycast>
               <queue name="ExpiryQueue" />
            </anycast>
         </address>

      </addresses>

   </core>
</configuration>


Server3 - Slave

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="urn:activemq
/schema/artemis-configuration.xsd">

   <core xmlns="urn:activemq:core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="urn:activemq:core ">

      <name>fmibroker</name>

      <persistence-enabled>true</persistence-enabled>
	  
	  
	  <jmx-management-enabled>true</jmx-management-enabled>

      
      <journal-type>NIO</journal-type>

      <paging-directory>./data/paging</paging-directory>

      <bindings-directory>./data/bindings</bindings-directory>

      <journal-directory>./data/journal</journal-directory>

     
<large-messages-directory>./data/large-messages</large-messages-directory>

      <journal-datasync>true</journal-datasync>

      <journal-min-files>2</journal-min-files>

      <journal-pool-files>-1</journal-pool-files>

      

      

      
      

      
      

      
      

      
      

      
      <journal-buffer-timeout>1488000</journal-buffer-timeout>

    <connectors>
        
        <connector
name="netty_connector">tcp://10.121.44.48:61616</connector>
   </connectors>

      
      <disk-scan-period>5000</disk-scan-period>

      
      <max-disk-usage>90</max-disk-usage>

      
      <global-max-size>100Mb</global-max-size>

      <acceptors>
         
         <acceptor
name="netty_acceptor">tcp://10.121.44.48:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE</acceptor>

      </acceptors>

      <cluster-user>xxxxx</cluster-user>
      <cluster-password>xxxxx</cluster-password>

      <broadcast-groups>
         <broadcast-group name="bg-group1">
            <group-address>${udp-address:231.7.7.7}</group-address>
            <group-port>9876</group-port>
            <broadcast-period>5000</broadcast-period>
            <connector-ref>netty_connector</connector-ref>
         </broadcast-group>
      </broadcast-groups>

      <discovery-groups>
         <discovery-group name="dg-group1">
            <group-address>${udp-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="fmieastcluster">
			
            <connector-ref>netty_connector</connector-ref>
			<retry-interval>1000</retry-interval>
            <message-load-balancing>ON_DEMAND</message-load-balancing>
            <max-hops>1</max-hops>
            <discovery-group-ref discovery-group-name="dg-group1"/> 
         </cluster-connection>
      </cluster-connections>
	  
      <ha-policy>
         <replication>
            <slave>
				<cluster-name>fmieastcluster</cluster-name>
				<group-name>useast</group-name>				
				<allow-failback>true</allow-failback>
			</slave>
         </replication>
      </ha-policy>

	  <management-address>jms.queue.activemq.management</management-address>
	  
      <security-settings>
		
		
		
		<security-setting match="jms.queue.activemq.management">
			<permission type="manage" roles="admin" />
		</security-setting>
	  
         <security-setting match="#">
            <permission type="createNonDurableQueue" roles="admin"/>
            <permission type="deleteNonDurableQueue" roles="admin"/>
            <permission type="createDurableQueue" roles="admin"/>
            <permission type="deleteDurableQueue" roles="admin"/>
            <permission type="createAddress" roles="admin"/>
            <permission type="deleteAddress" roles="admin"/>
            <permission type="consume" roles="admin"/>
            <permission type="browse" roles="admin"/>
            <permission type="send" roles="admin"/>
            
            <permission type="manage" roles="admin"/>
         </security-setting>
      </security-settings>

      <address-settings>
         
         <address-setting match="activemq.management#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
         
         <address-setting match="#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            
            <max-size-bytes>-1</max-size-bytes>
           
<message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
      </address-settings>

      <addresses>
         <address name="DLQ">
            <anycast>
               <queue name="DLQ" />
            </anycast>
         </address>
         <address name="ExpiryQueue">
            <anycast>
               <queue name="ExpiryQueue" />
            </anycast>
         </address>

      </addresses>

   </core>
</configuration>




--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-2-0-cluster-fail-over-issue-tp4726002p4726064.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message