activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TheKK <jkrishnaku...@gmail.com>
Subject Failover using Master/Slave Configuration(Slave Fail Error when Receiving message on a MasterSlave configuration)
Date Wed, 25 Apr 2007 14:26:55 GMT

Scenario:
==========
1)Start the Master and Slave server
2) Start the Subscriber Application which is subscribing to topic T 
3) Start the Publisher Application which publishing to topic T 
4) Now the Subscriber Application is able to receive the messages published
to topic T.
    Also,a slave fail error is caught while receiving message from master
broker on a master slave configuration. 
5) Stop the Master server
6) Publisher is able to reconnect and start publishing to topic T.
7) But the Subscriber is not able to recieve the messages.

In both Subscriber/Publisher Application the url used for obtaining the
ActiveMQ ConnectionFactory is as listed below:
url:
failover://(tcp://localhost:61616,tcp://localhost:61617)?randomize=false

Master Configuration
==================
<beans>

<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

<broker brokerName="master" useJmx="true"
xmlns="http://activemq.org/config/1.0">

    <persistenceAdapter>
      <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/data/broker" />
    </persistenceAdapter>

    <transportConnectors>
      <transportConnector uri="tcp://localhost:61616"
discoveryUri="multicast://default" />
    </transportConnectors>

	
    <networkConnectors>
      <networkConnector uri="multicast://default?initialReconnectDelay=100"
/>
      <!--networkConnector uri="static://(tcp://localhost:61616)" /-->
    </networkConnectors>
	

   </broker>

</beans>

 Slave Configuration
 ==================
 <beans>
 
 <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
 <broker brokerName="slave" masterConnectorURI="tcp://localhost:61616"
shutdownOnMasterFailure="false" useJmx="true"
xmlns="http://activemq.org/config/1.0">
 
     <persistenceAdapter>
       <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/data/slavebroker" />
     </persistenceAdapter>
 
     <transportConnectors>
       	  <transportConnector uri="tcp://localhost:61617"/>
     </transportConnectors>
 
   </broker>
 
</beans>

Master Log:
==========
INFO  BrokerService  - ActiveMQ 4.1.1 JMS Message Broker (brokerOne) is
starting
INFO  BrokerService   - For help or more information please
see:http://incubator.apache.org/activemq/
INFO  ManagementContext  - JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO  JDBCPersistenceAdapter   - Database driver recognized:
[apache_derby_embedded_jdbc_driver]
INFO  DefaultDatabaseLocker  - Attempting to acquire the exclusive lock to
become the Master broker
INFO  DefaultDatabaseLocker   - Becoming the master on dataSource:
org.apache.derby.jdbc.EmbeddedDataSource@9abc69
INFO  JournalPersistenceAdapter  - Journal Recovery Started from: Active
Journal: using 5 x 20.0 Megs at:
D:\apache-activemq-4.1.1\data\broker\journal
INFO  JournalPersistenceAdapter  - Journal Recovered: 0 message(s) in
transactions recovered.
INFO  TransportServerThreadSupport  - Listening for connections at:
tcp://DDP4345:61616
INFO  TransportConnector - Connector tcp://localhost:61616 Started
INFO  NetworkConnector   - Network Connector bridge Started
INFO  BrokerService      - ActiveMQ JMS Message Broker (brokerOne,
ID:DDP4345-2289-1177510211668-1:0) started


After the Slave server is up:
-----------------------------
INFO  TransportConnection            - Slave Broker slave is attached



The slave fail error is caught while receiving message from master broker on
a master slave configuration is as follows: 
---------------------------------------------------------------------------------------------------------------------------------
ERROR MasterBroker - Slave Failed
java.lang.AssertionError: Unsupported Method
at
org.apache.activemq.transport.TransportSupport.request(TransportSupport.java:71)
at
org.apache.activemq.transport.TransportFilter.request(TransportFilter.java:88)
at
org.apache.activemq.transport.TransportFilter.request(TransportFilter.java:88)
at
org.apache.activemq.transport.MutexTransport.request(MutexTransport.java:49)
at
org.apache.activemq.broker.ft.MasterBroker.sendSyncToSlave(MasterBroker.java:363)
at
org.apache.activemq.broker.ft.MasterBroker.sendToSlave(MasterBroker.java:345)
at
org.apache.activemq.broker.ft.MasterBroker.acknowledge(MasterBroker.java:320)
at
org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:88)
at
org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:488)
at org.apache.activemq.command.MessageAck.visit(MessageAck.java:179)
at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:284)
at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:177)
at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65)
at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:133)
at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137)
at java.lang.Thread.run(Thread.java:613)
ERROR MasterBroker - Slave Failed

Slave Log:
==========

The slave log looks like:

INFO  BrokerService  - ActiveMQ 4.1.1 JMS Message Broker (slave) is starting
INFO  BrokerService   - For help or more information please
see:http://incubator.apache.org/activemq/
WARN  ManagementContext  - Failed to start jmx connector: Cannot bind to URL
[rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException:
jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]
INFO  JDBCPersistenceAdapter - Database driver recognized:
[apache_derby_embedded_jdbc_driver]
INFO  DefaultDatabaseLocker  - Attempting to acquire the exclusive lock to
become the Master broker
INFO  DefaultDatabaseLocker  - Becoming the master on dataSource:
org.apache.derby.jdbc.EmbeddedDataSource@144b18f
INFO  JournalPersistenceAdapter  - Journal Recovery Started from: Active
Journal: using 5 x 20.0 Megs at:
D:\apache-activemq-4.1.1\data\slavebroker\journal
INFO  JournalPersistenceAdapter  - Journal Recovered: 0 message(s) in
transactions recovered.
INFO  TransportServerThreadSupport - Listening for connections at:
tcp://DDP4345:61617
INFO  TransportConnector - Connector tcp://localhost:61617 Started
INFO  TransportConnector  - Connector vm://slave Started
INFO  MasterConnector - Starting a network connection between vm://slave#0
and tcp://null:0 has been established.
INFO  BrokerService  - ActiveMQ JMS Message Broker (slave,
ID:DDP4345-2492-1177510494965-2:0) started
INFO  MasterConnector  - Slave connection between vm://slave#0 and
tcp://DDP4345/192.168.51.19:61616 has been established.


Version: apache-activemq-4.1.1


Summary:
 I am facing the same issue as mentioned in the below url:
	 https://issues.apache.org/activemq/browse/AMQ-1079
https://issues.apache.org/activemq/browse/AMQ-1079 
	
 I need to provide Fault Tolerence using ActiveMQ.
 Pls help/suggest your views how to provide Fault Tolerence to an
application using ActiveMQ.

 Thanks in advance..
















-- 
View this message in context: http://www.nabble.com/Failover-using-Master-Slave-Configuration%28Slave-Fail-Error-when-Receiving-message-on-a-MasterSlave-configuration%29-tf3645679s2354.html#a10181812
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message