You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dmitry Tsigelnik (JIRA)" <ji...@apache.org> on 2008/06/26 10:07:00 UTC

[jira] Created: (AMQ-1825) Pure MasterSlave doesn't work

Pure MasterSlave doesn't work
-----------------------------

                 Key: AMQ-1825
                 URL: https://issues.apache.org/activemq/browse/AMQ-1825
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.1.0
            Reporter: Dmitry Tsigelnik


Slave doen't synchronize state with master
1.If master has messages which absent in slave, these messages won't replicate ot slave after attaching slave to master.

2.If remove messages via JMX purge() in master, messages in slave won't remove

3. If slave has messages wich absent in master, these messages won't remove when slave is attaching to master

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1825) Pure MasterSlave doesn't work

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51133#action_51133 ] 

Michael Chen commented on AMQ-1825:
-----------------------------------

If in step 2 above, a timer is run that triggers a message being sent to a topic every second via a vm transport. then it will produce a different exception at step 4:

ERROR MasterBroker                   - Slave Failed
java.lang.NullPointerException
        at org.apache.activemq.broker.region.Topic.send(Topic.java:266)
        at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:350)
        at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:437)
        at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:224)
        at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
        at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:95)
        at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:133)
        at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:450)
        at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:639)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:205)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)


> Pure MasterSlave doesn't work
> -----------------------------
>
>                 Key: AMQ-1825
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1825
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>            Reporter: Dima
>             Fix For: 5.3.0
>
>
> Slave doen't synchronize state with master
> 1.If master has messages which absent in slave, these messages won't replicate ot slave after attaching slave to master.
> 2.If remove messages via JMX purge() in master, messages in slave won't remove
> 3. If slave has messages wich absent in master, these messages won't remove when slave is attaching to master

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1825) Pure MasterSlave doesn't work

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51201#action_51201 ] 

Michael Chen commented on AMQ-1825:
-----------------------------------

>From what I read, pure master/slave guarantees no message lost, but the networked broker documentation does not suggest that feature.  Nor does it explicitly say that it does exactly what pure master/slave do.

> Pure MasterSlave doesn't work
> -----------------------------
>
>                 Key: AMQ-1825
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1825
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>            Reporter: Dima
>             Fix For: 5.3.0
>
>
> Slave doen't synchronize state with master
> 1.If master has messages which absent in slave, these messages won't replicate ot slave after attaching slave to master.
> 2.If remove messages via JMX purge() in master, messages in slave won't remove
> 3. If slave has messages wich absent in master, these messages won't remove when slave is attaching to master

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1825) Pure MasterSlave doesn't work

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51132#action_51132 ] 

Michael Chen commented on AMQ-1825:
-----------------------------------

This has to do with NOT using the <broker waitForSlave="true" ... > setting. The steps to reproduce are:

1. Start master (waitForSlave=false).
2. Let some client connect and send messages to a topic or queue.
3. Start the slave.
4. Send more messages, which will produce the following on the SERVER side log:

ERROR MasterBroker                   - Slave Failed
java.lang.IllegalStateException: Cannot lookup a producer from a connection that had not been registered: ID:mwcs-37256-1237566087493-0:0
        at org.apache.activemq.broker.MapTransportConnectionStateRegister.lookupConnectionState(MapTransportConnectionStateRegister.java:73)
        at org.apache.activemq.broker.TransportConnection.lookupConnectionState(TransportConnection.java:1352)
        at org.apache.activemq.broker.TransportConnection.getProducerBrokerExchange(TransportConnection.java:1233)
        at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:449)
        at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:639)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
        at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:205)
        at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)

The master still functions normally, but it keep receiving the above complain from the slave on every replication. It seems that there is no "state replication" from the master to the slave when the slave first attached. I suspect this is a design flaw that must be plugged.

The only remedy is to use the <broker waitForSlave="true" ... > setting. Unfortunately, this degrades the pure master/slave significantly. If either the master or the slave is down, there is no way to restore the down node without shutting down the running node.  This means service interruption. The following no-service-interruption-scenarios are NOT possible:

Scenario1:
  master_up -> client_connect -> slave_up -> slave_down -> slave_restart

Scenario2:
  master_up -> client_connect -> slave_up -> master_down -> slave_become_master -> master_restart_as_slave

No service interruption is a common expectation of redundancy. This bug is related to bug AMQ-869.


> Pure MasterSlave doesn't work
> -----------------------------
>
>                 Key: AMQ-1825
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1825
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>            Reporter: Dima
>             Fix For: 5.3.0
>
>
> Slave doen't synchronize state with master
> 1.If master has messages which absent in slave, these messages won't replicate ot slave after attaching slave to master.
> 2.If remove messages via JMX purge() in master, messages in slave won't remove
> 3. If slave has messages wich absent in master, these messages won't remove when slave is attaching to master

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1825) Pure MasterSlave doesn't work

Posted by "ying (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51190#action_51190 ] 

ying commented on AMQ-1825:
---------------------------

To reduce service interruption, you can use a network of brokers so client can failover to them when you bring the running node down.

> Pure MasterSlave doesn't work
> -----------------------------
>
>                 Key: AMQ-1825
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1825
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>            Reporter: Dima
>             Fix For: 5.3.0
>
>
> Slave doen't synchronize state with master
> 1.If master has messages which absent in slave, these messages won't replicate ot slave after attaching slave to master.
> 2.If remove messages via JMX purge() in master, messages in slave won't remove
> 3. If slave has messages wich absent in master, these messages won't remove when slave is attaching to master

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.