activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adyr <adrian.rafa...@sphs.ro>
Subject Artemis 2.8 master-slave cluster with shared-store, no messages after failover
Date Mon, 27 May 2019 20:11:24 GMT
Hello,

I configured a master-slave cluster using a NFS shared storage.
The failback works, when masters goes down, the slaves comes up and take the
queues.
Unfortunately, after the slave comes up, there are no messages in any queue.
(as well when the master comes back live).

Master config:
<?xml version="1.0"?>

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xi="http://www.w3.org/2001/XInclude"
               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 ">

       
<bindings-directory>/shared_storage/apache-artemis/data/bindings</bindings-directory>
        <journal-type>ASYNCIO</journal-type>
       
<journal-directory>/shared_storage/apache-artemis/data/journal</journal-directory>
       
<large-messages-directory>/shared_storage/apache-artemis/data/largemessages</large-messages-directory>
       
<paging-directory>/shared_storage/apache-artemis/data/paging</paging-directory>
        <journal-pool-files>100000</journal-pool-files>
        <max-disk-usage>-1</max-disk-usage>
        <persistance-enabled>true</persistance-enabled>

        <cluster-user>user</cluster-user>
        <cluster-password>pass</cluster-password>

        <ha-policy>
                <shared-store>
                        <master>
                               
<failover-on-shutdown>true</failover-on-shutdown>
                        </master>
                </shared-store>
        </ha-policy>

        <cluster-connections>
                <cluster-connection name="il-prod-cluster">
                        <connector-ref>master-connector</connector-ref>
                       
<message-load-balancing>ON_DEMAND</message-load-balancing>
                        <static-connectors>
                               
<connector-ref>slave-connector</connector-ref>
                        </static-connectors>
                </cluster-connection>
        </cluster-connections>

        <connectors>
            <connector
name="master-connector">tcp://master_ip:61616</connector>
            <connector
name="slave-connector">tcp://slave_ip:61616</connector>
        </connectors>

        <acceptors>
                <acceptor
name="netty-acceptor">tcp://0.0.0.0:61616</acceptor>
        </acceptors>

        <security-settings>
         <security-setting match="#">
            <permission type="createNonDurableQueue" roles="amq"/>
            <permission type="deleteNonDurableQueue" roles="amq"/>
            <permission type="createDurableQueue" roles="amq"/>
            <permission type="deleteDurableQueue" roles="amq"/>
            <permission type="createAddress" roles="amq"/>
            <permission type="deleteAddress" roles="amq"/>
            <permission type="consume" roles="amq"/>
            <permission type="browse" roles="amq"/>
            <permission type="send" roles="amq"/>
            <permission type="manage" roles="amq"/>
         </security-setting>
      </security-settings>
        <address-settings>
         <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>


slave config:
<?xml version="1.0"?>

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xi="http://www.w3.org/2001/XInclude"
               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 ">

       
<bindings-directory>/shared_storage/apache-artemis/data/bindings</bindings-directory>
        <journal-type>ASYNCIO</journal-type>
       
<journal-directory>/shared_storage/apache-artemis/data/journal</journal-directory>
       
<large-messages-directory>/shared_storage/apache-artemis/data/largemessages</large-messages-directory>
       
<paging-directory>/shared_storage/apache-artemis/data/paging</paging-directory>
        <journal-pool-files>100000</journal-pool-files>
        <max-disk-usage>-1</max-disk-usage>
        <persistence-enabled>true</persistence-enabled>

        <cluster-user>user</cluster-user>
        <cluster-password>pass</cluster-password>

        <ha-policy>
                <shared-store>
                        <slave>
                                <failback-delay>3000</failback-delay>
                                <allow-failback>true</allow-failback>
                        </slave>
                </shared-store>
        </ha-policy>

        <cluster-connections>
                <cluster-connection name="il-prod-cluster">
                        <connector-ref>slave-connector</connector-ref>
                       
<message-load-balancing>ON_DEMAND</message-load-balancing>
                        <static-connectors>
                               
<connector-ref>master-connector</connector-ref>
                        </static-connectors>
                </cluster-connection>
        </cluster-connections>

        <connectors>
            <connector
name="master-connector">tcp://master_ip:61616</connector>
            <connector
name="slave-connector">tcp://slave_ip:61616</connector>
        </connectors>

        <acceptors>
                <acceptor
name="netty-acceptor">tcp://0.0.0.0:61616</acceptor>
        </acceptors>

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

        <address-settings>
         <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>



What I'm doing wrong or what am I missing?





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html

Mime
View raw message