You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Hanno Wiegard <hw...@voxeo.com> on 2011/09/26 14:44:16 UTC

Master/Slave reconnect problems - Unexpected extra broker info command received

Hi,

reconnecting to a master/slave pair from a broker with a network connector
fails after the master is shut down. The broker receives the error message 

Unexpected extra broker info command received: BrokerInfo {commandId = 519,
responseRequired = false, brokerId = slaveBroker, brokerURL =
tcp://localhost:61617, slaveBroker = true, masterBroker = false,
faultTolerantConfiguration = false, networkConnection = false,
duplexConnection = false, peerBrokerInfos = null, brokerName = slaveBroker,
connectionId = 0, brokerUploadUrl = null, networkProperties = #
#Mon Sep 26 14:09:19 CEST 2011
passiveSlave=false
}

and than stops sending messages. Directly before this message appears
everything looks like the reconnect happened correctly:

 WARN | Transport (/localhost:61616) failed to tcp://localhost:61616 ,
attempting to automatically reconnect due to: java.net.SocketException:
Connection reset
 INFO | Outbound transport to masterBroker interrupted.
 INFO | Active Slave Broker slaveBroker is attached

Everything was done using ActiveMQ 5.5. A producer with a broker is started
in the following way:

        final BrokerService broker = new BrokerService();
        broker.setBrokerName( "DummyProducerBroker" );
        broker.addConnector( "vm://localhost" );
        final NetworkConnector networkConnector =
broker.addNetworkConnector(
"static:(failover:(tcp://localhost:61616,tcp://localhost:61617)?randomize=false&maxReconnectAttempts=1)"
);
        networkConnector.setNetworkTTL( 5 );
        broker.start();
        final ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory( broker.getVmConnectorURI() );
        connection = connectionFactory.createConnection();
        connection.setClientID( this.getClass().getSimpleName() );
        connection.start();

Master and slave broker are currently running on the same maschine as the
consumer (for testing purpose).

Thanks,
Hanno




--
View this message in context: http://activemq.2283324.n4.nabble.com/Master-Slave-reconnect-problems-Unexpected-extra-broker-info-command-received-tp3843648p3843648.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.