Hi, I am trying to get a Master/Slave configuration of ActiveMQ working, but havn't had any luck on 4.1.1 or 5.0. When I use the 4.1.1 release, I run into this bug:
https://issues.apache.org/activemq/browse/AMQ-1257 Which appears to simply make Master/Slaves not work. The bugfix is against 5.0, so does that mean 4.1.1 does not work at all for Master Slave? So I tried the 5.0-snapshot from yesterday, and when I configure master/slave, I get this on the slave when the master fails: WARN BrokerService - Master Failed - starting all connectors ERROR BrokerService - Failed to startAllConnectors INFO TransportConnector - Connector vm://coral Stopped WARN AbstractRegion - A duplicate subscription was detected. Clients may be misbehaving. Later warnings you may see about subscription removal are a consequence of this. WARN AbstractRegion - A duplicate subscription was detected. Clients may be misbehaving. Later warnings you may see about subscription removal are a consequence of this. WARN AbstractRegion - A duplicate subscription was detected. Clients may be misbehaving. Later warnings you may see about subscription removal are a consequence of this. WARN AbstractRegion - A duplicate subscription was detected. Clients may be misbehaving. Later warnings you may see about subscription removal are a consequence of this. WARN AbstractRegion - A duplicate subscription was detected. Clients may be misbehaving. Later warnings you may see about subscription removal are a consequence of this. WARN AbstractRegion - A duplicate subscription was detected. Clients may be misbehaving. Later warnings you may see about subscription removal are a consequence of this. And then my queue consumer doesn't work, despite outputting to stderr that it failed over to the slave. If I restart the consumer, then everything seems fine (the producer works, and the topic producer/consumer seem fine). Is this a known issue? Is 5.0 my best bet for pure Master/Slave combination? Is there something I can do to help debug this? Here is may master config: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.org/config/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"> <!-- Allows us to use system properties as variables in this configuration file --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> <broker xmlns="http://activemq.org/config/1.0" brokerName="coral" dataDirectory="${activemq.base}/data"> <!-- The transport connectors ActiveMQ will listen to --> <transportConnectors> <transportConnector name="openwire" uri="tcp://localhost:61616" /> </transportConnectors> <!-- Use the following if you wish to configure the journal with JDBC --> <persistenceAdapter> <journaledJDBC journalLogFiles="5" dataDirectory="${activemq.base}/activemq-data" dataSource="#derby-ds"/> </persistenceAdapter> <!-- Or if you want to use pure JDBC without a journal --> <!-- <persistenceAdapter> <jdbcPersistenceAdapter dataSource="#postgres-ds"/> </persistenceAdapter> --> <!-- Use the following to set the broker memory limit <memoryManager> <usageManager id="memory-manager" limit="20 MB"/> </memoryManager> --> <!-- Use the following to configure how ActiveMQ is exposed in JMX --> <managementContext> <managementContext connectorPort="1099" jmxDomainName="org.apache.activemq"/> </managementContext> </broker> <!-- lets create a command agent to respond to message based admin commands on the ActiveMQ.Agent topic --> <commandAgent xmlns="http://activemq.org/config/1.0"/> <!-- An embedded servlet engine for serving up the Admin console --> <jetty xmlns="http://mortbay.com/schemas/jetty/1.0"> <connectors> <nioConnector port="8161" /> </connectors> <handlers> <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true" /> <webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true" /> </handlers> </jetty> <!-- Embedded Derby DataSource Sample Setup --> <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource"> <property name="databaseName" value="derbydb"/> <property name="createDatabase" value="create"/> </bean> </beans> Here is the diff between master and slave config: - <broker xmlns="http://activemq.org/config/1.0" brokerName="coral" dataDirectory="${activemq.base}/data"> + <broker masterConnectorURI="tcp://coral:61616" shutdownOnMasterFailure="false" xmlns="http://activemq.org/config/1.0" brokerName="cantillon" dataDirectory="${activemq.base}/data"> And I sync the master to the slave before starting both by doing: tar -czvf datafiles.tar.gz data activemq-data Thoughts? -Joe -- View this message in context: http://www.nabble.com/MasteSlave-does-not-appear-to-work-in-4.1.1-or-5.0-snapshot-tf4425028s2354.html#a12622765 Sent from the ActiveMQ - User mailing list archive at Nabble.com.