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

[jira] Created: (AMQ-1841) Network of pure master/slave synchronization issue

Network of pure master/slave synchronization issue
--------------------------------------------------

                 Key: AMQ-1841
                 URL: https://issues.apache.org/activemq/browse/AMQ-1841
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.1.0
         Environment: Solaris 9 jdk 1.5
            Reporter: ying
            Priority: Blocker


The topology is as follows:
Master A
Master B

Slave A
Slave B

configure the client(multiple threads of consumers and producers)  to use failover (failover://(tcp://masterA, tcp://masterB)) so slaves are only used to replicate data.

Issues:
Start masterA, slaveA, masterB, slaveB then start the client, slaveB will get IllegalStateException:
ERROR Service                        - Async error occurred: java.lang.IllegalStateException: brokerSlave2
Cannot add a consumer to a session that had not been registered: ID:usaapd1-32873-1215441964305-2:1:1
java.lang.IllegalStateException: brokerSlave2 Cannot add a consumer to a session that had not been register
ed: ID:usaapd1-32873-1215441964305-2:1:1
        at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:541)
        at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:345)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:310)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
        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)

Comments:
The issue seems that broker masterA and masterB's DemandForwardingBridge started before slaveB is attached so the commands to adding connections and sessions are not replicated on slaveB so the exception happens. For a network of pure master/slave, we kinda want the following to happen in order:
1. master to wait for slave to be attached 
2. master to accept demandforwardbridge from other master
3. start master transport to serve connections

Is there anyway to enforce the above order? 

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


[jira] Resolved: (AMQ-1841) Network of pure master/slave synchronization issue

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies resolved AMQ-1841.
-----------------------------

    Fix Version/s: 5.2.0
       Resolution: Fixed

This is solved by SVN revision 691206?

> Network of pure master/slave synchronization issue
> --------------------------------------------------
>
>                 Key: AMQ-1841
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1841
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>         Environment: Solaris 9 jdk 1.5
>            Reporter: ying
>            Assignee: Rob Davies
>            Priority: Blocker
>             Fix For: 5.2.0
>
>
> The topology is as follows:
> Master A
> Master B
> Slave A
> Slave B
> configure the client(multiple threads of consumers and producers)  to use failover (failover://(tcp://masterA, tcp://masterB)) so slaves are only used to replicate data.
> Issues:
> Start masterA, slaveA, masterB, slaveB then start the client, slaveB will get IllegalStateException:
> ERROR Service                        - Async error occurred: java.lang.IllegalStateException: brokerSlave2
> Cannot add a consumer to a session that had not been registered: ID:usaapd1-32873-1215441964305-2:1:1
> java.lang.IllegalStateException: brokerSlave2 Cannot add a consumer to a session that had not been register
> ed: ID:usaapd1-32873-1215441964305-2:1:1
>         at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:541)
>         at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:345)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:310)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
>         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)
> Comments:
> The issue seems that broker masterA and masterB's DemandForwardingBridge started before slaveB is attached so the commands to adding connections and sessions are not replicated on slaveB so the exception happens. For a network of pure master/slave, we kinda want the following to happen in order:
> 1. master to wait for slave to be attached 
> 2. master to accept demandforwardbridge from other master
> 3. start master transport to serve connections
> Is there anyway to enforce the above order? 

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


[jira] Assigned: (AMQ-1841) Network of pure master/slave synchronization issue

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies reassigned AMQ-1841:
-------------------------------

    Assignee: Rob Davies

> Network of pure master/slave synchronization issue
> --------------------------------------------------
>
>                 Key: AMQ-1841
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1841
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>         Environment: Solaris 9 jdk 1.5
>            Reporter: ying
>            Assignee: Rob Davies
>            Priority: Blocker
>
> The topology is as follows:
> Master A
> Master B
> Slave A
> Slave B
> configure the client(multiple threads of consumers and producers)  to use failover (failover://(tcp://masterA, tcp://masterB)) so slaves are only used to replicate data.
> Issues:
> Start masterA, slaveA, masterB, slaveB then start the client, slaveB will get IllegalStateException:
> ERROR Service                        - Async error occurred: java.lang.IllegalStateException: brokerSlave2
> Cannot add a consumer to a session that had not been registered: ID:usaapd1-32873-1215441964305-2:1:1
> java.lang.IllegalStateException: brokerSlave2 Cannot add a consumer to a session that had not been register
> ed: ID:usaapd1-32873-1215441964305-2:1:1
>         at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:541)
>         at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:345)
>         at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:310)
>         at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
>         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)
> Comments:
> The issue seems that broker masterA and masterB's DemandForwardingBridge started before slaveB is attached so the commands to adding connections and sessions are not replicated on slaveB so the exception happens. For a network of pure master/slave, we kinda want the following to happen in order:
> 1. master to wait for slave to be attached 
> 2. master to accept demandforwardbridge from other master
> 3. start master transport to serve connections
> Is there anyway to enforce the above order? 

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