|
Marlon Santos made changes - 29/Nov/06 11:55 PM
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 made changes - 27/Dec/06 12:01 AM
this is fixed by SVN revision 490454
Rob Davies made changes - 27/Dec/06 12:01 AM
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
Mike Lawrence made changes - 19/Jul/07 12:35 PM
Mike Lawrence made changes - 19/Jul/07 01:45 PM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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>