History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: AMQ-1079
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Major Major
Assignee: Rob Davies
Reporter: Marlon Santos
Votes: 3
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

Slave Fail Error when Receiving message on a MasterSlave configuration

Created: 29/Nov/06 11:51 PM   Updated: 19/Jul/07 01:45 PM
Component/s: Broker
Affects Version/s: 5.0.0
Fix Version/s: 4.1.2

Time Tracking:
Not Specified

File Attachments: 1. Java Source File ConsumerTool.java (8 kb)
2. Java Source File MasterSlave.java (2 kb)
3. Java Source File ProducerTool.java (6 kb)

Environment: Windows XP, jdk1.5


 Description  « Hide
A slave fail error is caught while receiving message from master broker on a master slave configuration.

I included the java files that I used. Running this through xbean/xml config also produces the same error.

SEVERE: 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:491)
at org.apache.activemq.command.MessageAck.visit(MessageAck.java:179)
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:287)
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
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:595)



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
William Blackburn - 14/Dec/06 08:55 AM
Please, ActiveMQ developers, please comment on this issue - it is a showstopper for us. Even the knowledge that you are unable to reproduce would be helpful, because we could then provide more data or test-cases. Our story is as follows:

We configure the master and slave according to the instructions on the site. They both start up OK, and we can see from the logs that the slave attaches to the master. But, as soon as the first connection is made to the master, the slave dies. When the client attempts to failover, the slave can't accept the connection of course, and everything fails.

The master log looks like:

INFO DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
INFO DefaultDatabaseLocker - Becoming the master on dataSource: org.postgresql.ds.PGPoolingDataSource@724f31
INFO JournalPersistenceAdapter - Journal Recovery Started from: Active Journal: using 5 x 20.0 Megs at: /Users/wblackburn/activemq-4.1.0-master/activemq-data/journal
INFO JournalPersistenceAdapter - Journal Recovered: 0 message(s) in transactions recovered.
INFO TransportServerThreadSupport - Listening for connections at: tcp://fastgt.local:61617
INFO TransportConnector - Connector openwire Started
INFO BrokerService - ActiveMQ JMS Message Broker (localhost, ID:fastgt.local-50799-1166058345810-1:0) started
INFO TransportConnection - Slave Broker localhost is attached
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

master config is:

<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" dataSource="#postgres-ds"/>
</persistenceAdapter>

<transportConnectors>
<transportConnector name="openwire" uri="tcp://localhost:61617"/>
</transportConnectors>

</broker>

<!-- This xbean configuration file supports all the standard spring xml configuration options -->

<!-- Postgres DataSource Sample Setup -->
<bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
<property name="serverName" value="localhost"/>
<property name="databaseName" value="activemq"/>
<property name="portNumber" value="0"/>
<property name="user" value="activemq"/>
<property name="password" value="activemq"/>
<property name="dataSourceName" value="postgres"/>
<property name="initialConnections" value="1"/>
<property name="maxConnections" value="10"/>
</bean>

</beans>



The slave log looks like:

INFO DefaultDatabaseLocker - Attempting to acquire the exclusive lock to become the Master broker
INFO DefaultDatabaseLocker - Becoming the master on dataSource: org.postgresql.ds.PGPoolingDataSource@bcd14a
INFO JournalPersistenceAdapter - Journal Recovery Started from: Active Journal: using 5 x 20.0 Megs at: /Users/wblackburn/activemq-4.1.0-slave/activemq-data/journal
INFO JournalPersistenceAdapter - Journal Recovered: 0 message(s) in transactions recovered.
INFO TransportServerThreadSupport - Listening for connections at: tcp://fastgt.local:61618
INFO TransportConnector - Connector openwire 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:fastgt.local-50808-1166058365982-2:0) started
INFO MasterConnector - Slave connection between vm://localhost#0 and tcp://localhost/127.0.0.1:61617 has been established.

Slave config is:

<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" masterConnectorURI="tcp://localhost:61617" shutdownOnMasterFailure="false">

<persistenceAdapter>
<journaledJDBC journalLogFiles="5" dataDirectory="${activemq.base}/activemq-data" dataSource="#postgres-ds"/>
</persistenceAdapter>

<transportConnectors>
<transportConnector name="openwire" uri="tcp://localhost:61618"/>
</transportConnectors>

</broker>

<!-- This xbean configuration file supports all the standard spring xml configuration options -->

<!-- Postgres DataSource Sample Setup -->
<bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
<property name="serverName" value="localhost"/>
<property name="databaseName" value="amqslave"/>
<property name="portNumber" value="0"/>
<property name="user" value="activemq"/>
<property name="password" value="activemq"/>
<property name="dataSourceName" value="postgres"/>
<property name="initialConnections" value="1"/>
<property name="maxConnections" value="10"/>
</bean>

</beans>


William Blackburn - 14/Dec/06 10:04 AM
I should have mentioned that we are using the 4.1 release. I just retested with the latest 4.2 snapshot and the problem still occurs, same config as above.

Rob Davies - 27/Dec/06 12:01 AM
this is fixed by SVN revision 490454

Mike Lawrence - 19/Jul/07 12:35 PM
I justed looked at 490454 in subversion. all it does is comment out some debugging code.
This is real issue that is a duplicate of AMQ-1257

Mike Lawrence - 19/Jul/07 01:45 PM