I'm trying to create a Pure Master Slave configuration using AMQ 4.1.1 and a
slightly stripped down version of the default configuration files. (I
originally tried with AMQ 5.0.0 but had too many problems, so I dropped back
a release.) After the Master and Slave seem to start up okay, the system
doesn't work properly when I send messages using the default Producer
application with this failover URL in the build.xml file:

<property name="url"
value="failover:(tcp://macserver:61616,tcp://localhost:61616)?initialReconnectDelay=100"
/>

In that line, "macserver" is the name of the Master server (a Mac OS X
system) and localhost is my Slave system (Windows XP).

Once I type

ant producer

with this configuration, the Master system throws this exception for each
message that is sent:

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:54)
        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:506)
        at org.apache.activemq.command.MessageAck.visit(MessageAck.java:179)
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185)
        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)

When I use the "browse" command the Master does show that my messages are in
the queue, but when I check the Slave it has no messages. The Slave system
also does not throw any exceptions. It just shows this message:

Loading message broker from: xbean:activemq.xml
INFO  BrokerService                  - ActiveMQ 4.1.1 JMS Message Broker
(localhost) 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:
[EMAIL PROTECTED]
INFO  JournalPersistenceAdapter      - Journal Recovery Started from: Active
Journal: using 5 x 20.0 Megs at:
C:\Work\PureMasterSlave\Slave-411\activemq-data\journal
INFO  JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in
transactions recovered.
INFO  TransportServerThreadSupport   - Listening for connections at:
tcp://winxp911:61616
INFO  TransportConnector             - Connector openwire Started
INFO  TransportServerThreadSupport   - Listening for connections at:
stomp://winxp911:61613
INFO  TransportConnector             - Connector stomp Started
INFO  TransportConnector             - Connector vm://localhost Started
INFO  MasterConnector                - Starting a network connection between
vm://localhost#0 and tcp://null:0 has been established.
INFO  BrokerService                  - ActiveMQ JMS Message Broker
(localhost, ID:winxp911-1560-1203001783263-2:0) started
INFO  MasterConnector                - Slave connection between
vm://localhost#0 and tcp://macserver/172.30.28.88:61616 has been
established.

The Master continues to save new messages to my queue, but throws that same
exception for each new message added.

Here are my activemq.xml configuration files:

MASTER
------

<beans>

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker brokerName="localhost" useJmx="true"
xmlns="http://activemq.org/config/1.0";>
  
    <persistenceAdapter>
        <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/activemq-data"/>
    </persistenceAdapter>
  
    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>
    
  </broker>
  
</beans>


SLAVE
-----

<beans>

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker brokerName="localhost" xmlns="http://activemq.org/config/1.0";
masterConnectorURI="tcp://macserver:61616" shutdownOnMasterFailure="false">
  
    <persistenceAdapter>
        <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/activemq-data"/>
    </persistenceAdapter>
  
    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>
    
  </broker>
  
</beans>

Finally, I've totally dropped the firewalls on both systems, and the Mac
(Master) is using Java 1.5.0_07, and the Windows system (Slave) is using
1.6.0_04. 

I'd appreciate it if anyone can help troubleshoot this problem. I haven't
changed much from the default values, and looking at the docs on the site I
think I'm doing everything right, but it's not working.


-- 
View this message in context: 
http://www.nabble.com/Pure-Master-Slave-not-working-tp15481240s2354p15481240.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to