You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2010/09/07 16:21:40 UTC

[jira] Updated: (AMQ-2904) failover: protocol doesn't work within a static:() URI in a networkConnector

     [ https://issues.apache.org/activemq/browse/AMQ-2904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully updated AMQ-2904:
----------------------------

     Regression: [Regression]
    Description: 
Am configuring a networkConnector, and want it to do failover against two brokers. Xml config snippit:{code}
<networkConnectors>
            <networkConnector  uri="static:(failover:(tcp://${activemq01.master.networkconnector.ip}:${activemq01.master.openwire.port},tcp://${activemq01.slave.networkconnector.ip}:${activemq01.slave.openwire.port})?randomize=true)"
                duplex="true"
                networkTTL="2"/>
        </networkConnectors>{code}
Problem is, the failoer doesn't work 

When activemq02 connects to activemq01, we see the following on activemq01:
{code}
INFO | Connector openwire Started
 INFO | ActiveMQ JMS Message Broker (activemq01, ID:Ade's-52856-1283520722984-0:0) started
 INFO | Connector vm://activemq01 Started
 INFO | Created Duplex Bridge back to activemq02
 INFO | Network connection between vm://activemq01#0 and tcp:///127.0.0.1:52864(activemq02) has been established.{code}
All good! If I take activemq01 down, then on reconnect, we don't see the duplex bridge get created. This is the output from activemq01.{code}

INFO | Recovery replayed 1 operations from the journal in 0.036 seconds.
 INFO | ActiveMQ 5.4.0-fuse-00-00 JMS Message Broker (activemq01) is starting
 INFO | For help or more information please see: http://activemq.apache.org/
 INFO | Scheduler using directory: activemq-data/scheduler
 INFO | Listening for connections at: tcp://0.0.0.0:61626
 INFO | Connector openwire Started
 INFO | ActiveMQ JMS Message Broker (activemq01, ID:Ade's-52922-1283520881264-0:0) started{code}
Note that there's no mention of a Duplex bridge. The output from the activemq02 broker says:
{code}
Transport (/127.0.0.1:61616) failed to tcp://127.0.0.1:61616 , attempting to automatically reconnect due to: java.io.EOFException
 INFO | Outbound transport to activemq01 interrupted.
 INFO | Network connection between vm://activemq02#0 and tcp://127.0.0.1:61626(activemq01) has been established.
 INFO | Outbound transport to activemq01 resumed
 INFO | Successfully reconnected to tcp://127.0.0.1:61626
 WARN | Unexpected extra broker info command received: BrokerInfo {commandId = 19, responseRequired = false, brokerId = ID:Ade's-52922-1283520881264-0:0, brokerURL = tcp://0.0.0.0:61626, slaveBroker = false, masterBroker = false, faultTolerantConfiguration = false, networkConnection = false, duplexConnection = false, peerBrokerInfos = [], brokerName = activemq01, connectionId = 0, brokerUploadUrl = null, networkProperties = null}{code}

  was:
Am configuring a networkConnector, and want it to do failover against two brokers. Xml config snippit:{code}
<networkConnectors>            <networkConnector                uri="static:(failover:(tcp://${activemq01.master.networkconnector.ip}:${activemq01.master.openwire.port},tcp://${activemq01.slave.networkconnector.ip}:${activemq01.slave.openwire.port})?randomize=true)"
                duplex="true"
                networkTTL="2"/>
        </networkConnectors>{code}
Problem is, the failoer doesn't work 

When activemq02 connects to activemq01, we see the following on activemq01:
{code}
INFO | Connector openwire Started
 INFO | ActiveMQ JMS Message Broker (activemq01, ID:Ade's-52856-1283520722984-0:0) started
 INFO | Connector vm://activemq01 Started
 INFO | Created Duplex Bridge back to activemq02
 INFO | Network connection between vm://activemq01#0 and tcp:///127.0.0.1:52864(activemq02) has been established.{code}
All good! If I take activemq01 down, then on reconnect, we don't see the duplex bridge get created. This is the output from activemq01.{code}

INFO | Recovery replayed 1 operations from the journal in 0.036 seconds.
 INFO | ActiveMQ 5.4.0-fuse-00-00 JMS Message Broker (activemq01) is starting
 INFO | For help or more information please see: http://activemq.apache.org/
 INFO | Scheduler using directory: activemq-data/scheduler
 INFO | Listening for connections at: tcp://0.0.0.0:61626
 INFO | Connector openwire Started
 INFO | ActiveMQ JMS Message Broker (activemq01, ID:Ade's-52922-1283520881264-0:0) started{code}
Note that there's no mention of a Duplex bridge. The output from the activemq02 broker says:
{code}
Transport (/127.0.0.1:61616) failed to tcp://127.0.0.1:61616 , attempting to automatically reconnect due to: java.io.EOFException
 INFO | Outbound transport to activemq01 interrupted.
 INFO | Network connection between vm://activemq02#0 and tcp://127.0.0.1:61626(activemq01) has been established.
 INFO | Outbound transport to activemq01 resumed
 INFO | Successfully reconnected to tcp://127.0.0.1:61626
 WARN | Unexpected extra broker info command received: BrokerInfo {commandId = 19, responseRequired = false, brokerId = ID:Ade's-52922-1283520881264-0:0, brokerURL = tcp://0.0.0.0:61626, slaveBroker = false, masterBroker = false, faultTolerantConfiguration = false, networkConnection = false, duplexConnection = false, peerBrokerInfos = [], brokerName = activemq01, connectionId = 0, brokerUploadUrl = null, networkProperties = null}{code}


Issue is related to interruption processing in the failover transport for an activemq client connection with active consumers. A network connector, just listening for consumer advisories does not need this feature. The interruption processing and replay of consumers in pull mode pending interruption processing completion should be limited to JMS consumer connections.

> failover: protocol doesn't work within a static:() URI in a networkConnector
> ----------------------------------------------------------------------------
>
>                 Key: AMQ-2904
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2904
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.4.0
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>             Fix For: 5.4.1
>
>
> Am configuring a networkConnector, and want it to do failover against two brokers. Xml config snippit:{code}
> <networkConnectors>
>             <networkConnector  uri="static:(failover:(tcp://${activemq01.master.networkconnector.ip}:${activemq01.master.openwire.port},tcp://${activemq01.slave.networkconnector.ip}:${activemq01.slave.openwire.port})?randomize=true)"
>                 duplex="true"
>                 networkTTL="2"/>
>         </networkConnectors>{code}
> Problem is, the failoer doesn't work 
> When activemq02 connects to activemq01, we see the following on activemq01:
> {code}
> INFO | Connector openwire Started
>  INFO | ActiveMQ JMS Message Broker (activemq01, ID:Ade's-52856-1283520722984-0:0) started
>  INFO | Connector vm://activemq01 Started
>  INFO | Created Duplex Bridge back to activemq02
>  INFO | Network connection between vm://activemq01#0 and tcp:///127.0.0.1:52864(activemq02) has been established.{code}
> All good! If I take activemq01 down, then on reconnect, we don't see the duplex bridge get created. This is the output from activemq01.{code}
> INFO | Recovery replayed 1 operations from the journal in 0.036 seconds.
>  INFO | ActiveMQ 5.4.0-fuse-00-00 JMS Message Broker (activemq01) is starting
>  INFO | For help or more information please see: http://activemq.apache.org/
>  INFO | Scheduler using directory: activemq-data/scheduler
>  INFO | Listening for connections at: tcp://0.0.0.0:61626
>  INFO | Connector openwire Started
>  INFO | ActiveMQ JMS Message Broker (activemq01, ID:Ade's-52922-1283520881264-0:0) started{code}
> Note that there's no mention of a Duplex bridge. The output from the activemq02 broker says:
> {code}
> Transport (/127.0.0.1:61616) failed to tcp://127.0.0.1:61616 , attempting to automatically reconnect due to: java.io.EOFException
>  INFO | Outbound transport to activemq01 interrupted.
>  INFO | Network connection between vm://activemq02#0 and tcp://127.0.0.1:61626(activemq01) has been established.
>  INFO | Outbound transport to activemq01 resumed
>  INFO | Successfully reconnected to tcp://127.0.0.1:61626
>  WARN | Unexpected extra broker info command received: BrokerInfo {commandId = 19, responseRequired = false, brokerId = ID:Ade's-52922-1283520881264-0:0, brokerURL = tcp://0.0.0.0:61626, slaveBroker = false, masterBroker = false, faultTolerantConfiguration = false, networkConnection = false, duplexConnection = false, peerBrokerInfos = [], brokerName = activemq01, connectionId = 0, brokerUploadUrl = null, networkProperties = null}{code}

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