activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Bertram <jbert...@apache.org>
Subject Re: ActiveMq Artemis Master/Slave
Date Wed, 09 Jan 2019 18:58:44 GMT
I already addressed your question on Stack Overflow [1].  Take a look and
respond there.


Justin

[1]
https://stackoverflow.com/questions/54112308/warn-when-an-activemq-artemis-master-slave-pair-is-deployed-in-openshift

On Wed, Jan 9, 2019 at 12:39 PM juan.martin@techonrails.com <
juan.martin@techonrails.com> wrote:

> Hi all,
>
> I´m trying to deploy an ActiveMQ Artemis Cluster as Master/Slave in
> Openshift. I have been able to connect both brokers (differents
> containers),
> I Persist the data folder of the brokers to share the fileSystem. In Slave
> container i received continually this Error:
>
> 2019-01-09 07:50:40,192 WARN  [org.apache.activemq.artemis.core.server]
> AMQ222137: Unable to announce backup, retrying:
> ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT
> message=AMQ119012: Timed out waiting to receive initial broadcast from
> cluster]
> at
>
> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:759)
> [artemis-core-client-2.6.3.jar:2.6.3]
> at
>
> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:635)
> [artemis-core-client-2.6.3.jar:2.6.3]
> at
>
> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:617)
> [artemis-core-client-2.6.3.jar:2.6.3]
> at
>
> org.apache.activemq.artemis.core.server.cluster.BackupManager$BackupConnector$1.run(BackupManager.java:246)
> [artemis-server-2.6.3.jar:2.6.3]
> at
>
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
> [artemis-commons-2.6.3.jar:2.6.3]
> at
>
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
> [artemis-commons-2.6.3.jar:2.6.3]
> at
>
> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66)
> [artemis-commons-2.6.3.jar:2.6.3]
> at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [rt.jar:1.8.0_181]
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [rt.jar:1.8.0_181]
> at
>
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
> [artemis-commons-2.6.3.jar:2.6.3]
>
>
> I have a service in Java with a failover configurated, but when  I shotdown
> the master container, this microservice doesn`t start to send to the slave
> container. This configuration works when the cluster is deployed in only
> one
> instance and two brokers in the same instance.
>
> There are the configuration files of the brokers:
>
> broker_master.xml:
>
>
> <?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 ">
>     <name>0.0.0.0</name>
>     <persistence-enabled>true</persistence-enabled>
>
>     <journal-type>ASYNCIO</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>10</journal-pool-files>
>     <journal-file-size>10M</journal-file-size>
>
>     <journal-buffer-timeout>36000</journal-buffer-timeout>
>
>     <journal-max-io>4096</journal-max-io>
>
>
>
>
>
>
>
>
>
>
>
>     <disk-scan-period>5000</disk-scan-period>
>
>     <max-disk-usage>90</max-disk-usage>
>
>     <critical-analyzer>true</critical-analyzer>
>     <critical-analyzer-timeout>120000</critical-analyzer-timeout>
>     <critical-analyzer-check-period>60000</critical-analyzer-check-period>
>     <critical-analyzer-policy>HALT</critical-analyzer-policy>
>
>     <ha-policy>
>      <shared-store>
>       <master>
>        <failover-on-shutdown>true</failover-on-shutdown>
>       </master>
>      </shared-store>
>     </ha-policy>
>
>
>
>
>
>
>     <connectors>
>          <connector name="netty-connector">tcp://0.0.0.0:61616</connector>
>     </connectors>
>
>     <acceptors>
>          <acceptor name="netty-acceptor">tcp://0.0.0.0:61616</acceptor>
>     </acceptors>
>
>
>     <broadcast-groups>
>        <broadcast-group name="bg-group1">
>           <group-address>${udp-address:231.7.7.7}</group-address>
>           <group-port>9876</group-port>
>           <broadcast-period>1000</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>60000</refresh-timeout>
>        </discovery-group>
>     </discovery-groups>
>
>     <cluster-connections>
>        <cluster-connection name="my-cluster">
>           <connector-ref>netty-connector</connector-ref>
>           <discovery-group-ref discovery-group-name="dg-group1"/>
>        </cluster-connection>
>     </cluster-connections>
>
>
>
>     <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="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>
>
>
>
>
> broker_slave.xml
>
>
> <?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 ">
>     <name>0.0.0.0</name>
>     <persistence-enabled>true</persistence-enabled>
>
>     <journal-type>ASYNCIO</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>10</journal-pool-files>
>     <journal-file-size>10M</journal-file-size>
>
>     <journal-buffer-timeout>36000</journal-buffer-timeout>
>
>     <journal-max-io>4096</journal-max-io>
>
>
>
>
>
>
>
>
>
>
>
>     <disk-scan-period>5000</disk-scan-period>
>
>     <max-disk-usage>90</max-disk-usage>
>
>     <critical-analyzer>true</critical-analyzer>
>     <critical-analyzer-timeout>120000</critical-analyzer-timeout>
>     <critical-analyzer-check-period>60000</critical-analyzer-check-period>
>     <critical-analyzer-policy>HALT</critical-analyzer-policy>
>
>     <ha-policy>
>      <shared-store>
>       <slave>
>        <failover-on-shutdown>true</failover-on-shutdown>
>       </slave>
>      </shared-store>
>     </ha-policy>
>
>
>
>
>
>
>     <connectors>
>          <connector name="netty-connector">tcp://0.0.0.0:61617</connector>
>     </connectors>
>
>     <acceptors>
>          <acceptor name="netty-acceptor">tcp://0.0.0.0:61617</acceptor>
>     </acceptors>
>
>
>     <broadcast-groups>
>        <broadcast-group name="bg-group1">
>           <group-address>${udp-address:231.7.7.7}</group-address>
>           <group-port>9876</group-port>
>           <broadcast-period>1000</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>60000</refresh-timeout>
>        </discovery-group>
>     </discovery-groups>
>
>     <cluster-connections>
>        <cluster-connection name="my-cluster">
>           <connector-ref>netty-connector</connector-ref>
>           <discovery-group-ref discovery-group-name="dg-group1"/>
>        </cluster-connection>
>     </cluster-connections>
>
>
>
>     <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="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>
>
>
>
>
> Thanks in advance.
> Juan Carlos Martin
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message