activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matías Cobiella <matiascobie...@yahoo.com>
Subject Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE
Date Mon, 05 Mar 2007 16:01:00 GMT

Please let me know if you need something else or if you want me to do any
further testing. I want to collaborate.


>>>>>I wouldn't have thought so. I wonder, which version of MySQL are you
>>>>>using - am wondering if the Master/Slave stuff isn't completely
>>>>>working. 

I'm using MySQL 5.0.24a


>>>>>e.g. does the log of the brokers show what you think is
>>>>>happening.

The activemq.log of both brokers are emtpy. The console of the SLAVE when it
becomes MASTER is clean as show below:

ACTIVEMQ_HOME: C:\activemq-SLAVE\bin\..
ACTIVEMQ_BASE: C:\activemq-SLAVE\bin\..
Loading message broker from: xbean:activemq.xml
INFO  BrokerService                  - Using Persistence Adapter:
JDBCPersistenceAdaptor(org.apache.commons.dbcp.BasicDataSource@bb0d0d)
INFO  BrokerService                  - ActiveMQ null JMS Message Broker
(SLAVE) 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:12980/jmxrmi
INFO  JDBCPersistenceAdapter         - Database driver recognized:
[mysql-ab_jdbc_driver]
INFO  DefaultDatabaseLocker          - Attempting to acquire the exclusive
lock to become the Master broker
INFO  DefaultDatabaseLocker          - Becoming the master on dataSource:
org.apache.commons.dbcp.BasicDataSource@bb0d0d
INFO  TransportServerThreadSupport   - Listening for connections at:
tcp://MT13412:22222
INFO  TransportConnector             - Connector TC-SLAVE Started
INFO  BrokerService                  - ActiveMQ JMS Message Broker (SLAVE,
ID:MT13412-1502-1173109077515-1:0) started
INFO  KahaStore                      - Kaha Store successfully deleted data
directory activemq-data\SLAVE\tmp_storage



>>>>>i.e. the broker log clearly shows the slave doesn't think its the
>>>>>master until the master dies?

No, the SLAVE seems to become MASTER normally. Moreover, the ProducerTool
failover to it. Here is the log:


Connecting to URL: failover:(tcp://localhost:11111,tcp://localhost:22222)
Publishing a Message with size 255 to queue: TOOL.DEFAULT
Using persistent messages
Sleeping between publish 5000 ms
[INFO] FailoverTransport - -Successfully reconnected to
tcp://localhost:11111
Sending message: Message: 0 sent at: Mon Mar 05 12:38:34 GMT-03:00 ...
Sending message: Message: 1 sent at: Mon Mar 05 12:38:39 GMT-03:00 ...
Sending message: Message: 2 sent at: Mon Mar 05 12:38:44 GMT-03:00 ...
Sending message: Message: 3 sent at: Mon Mar 05 12:38:50 GMT-03:00 ...
Sending message: Message: 4 sent at: Mon Mar 05 12:38:55 GMT-03:00 ...
Sending message: Message: 5 sent at: Mon Mar 05 12:39:00 GMT-03:00 ...
Sending message: Message: 6 sent at: Mon Mar 05 12:39:05 GMT-03:00 ...
java.io.EOFException
	at java.io.DataInputStream.readInt(DataInputStream.java:358)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
	at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
	at java.lang.Thread.run(Thread.java:595)
[WARN] FailoverTransport - -Transport failed, attempting to automatically
reconnect due to: java.io.EOFException <java.io.EOFException>
[INFO] FailoverTransport - -Successfully reconnected to
tcp://localhost:22222
Sending message: Message: 7 sent at: Mon Mar 05 12:39:11 GMT-03:00 ...
Sending message: Message: 8 sent at: Mon Mar 05 12:39:16 GMT-03:00 ...
Sending message: Message: 9 sent at: Mon Mar 05 12:39:21 GMT-03:00 ...
Done.
java.io.EOFException
	at java.io.DataInputStream.readInt(DataInputStream.java:358)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
	at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
	at java.lang.Thread.run(Thread.java:595)
[WARN] FailoverTransport - -Transport failed, attempting to automatically
reconnect due to: java.io.EOFException <java.io.EOFException>
connection {
  session {
    messageCount{ count: 10 unit: count startTime: 1173109114218
lastSampleTime: 1173109161671 description: Number of messages exchanged }
    messageRateTime{ count: 10 maxTime: 5407 minTime: 94 totalTime: 47406
averageTime: 4740.6 averageTimeExMinMax: 5238.125 averagePerSecond:
0.21094376239294602 averagePerSecondExMinMax: 0.1909080062045102 unit:
millis startTime: 1173109114218 lastSampleTime: 1173109161671 description:
Time taken to process a message (thoughtput rate) }
    pendingMessageCount{ count: 0 unit: count startTime: 1173109114218
lastSampleTime: 1173109114218 description: Number of pending messages }
    expiredMessageCount{ count: 0 unit: count startTime: 1173109114218
lastSampleTime: 1173109114218 description: Number of expired messages }
    messageWaitTime{ count: 0 maxTime: 0 minTime: 0 totalTime: 0
averageTime: 0.0 averageTimeExMinMax: 0.0 averagePerSecond: 0.0
averagePerSecondExMinMax: 0.0 unit: millis startTime: 1173109114218
lastSampleTime: 1173109114218 description: Time spent by a message before
being delivered }
    durableSubscriptionCount{ count: 0 unit: count startTime: 1173109114218
lastSampleTime: 1173109114218 description: The number of durable
subscriptions }

    producers {
      producer queue://TOOL.DEFAULT {
        messageCount{ count: 10 unit: count startTime: 1173109114265
lastSampleTime: 1173109161671 description: Number of messages processed }
        messageRateTime{ count: 10 maxTime: 5407 minTime: 94 totalTime:
47406 averageTime: 4740.6 averageTimeExMinMax: 5238.125 averagePerSecond:
0.21094376239294602 averagePerSecondExMinMax: 0.1909080062045102 unit:
millis startTime: 1173109114265 lastSampleTime: 1173109161671 description:
Time taken to process a message (thoughtput rate) }
        pendingMessageCount{ count: 0 unit: count startTime: 1173109114265
lastSampleTime: 1173109114265 description: Number of pending messages }
        messageRateTime{ count: 10 maxTime: 5407 minTime: 94 totalTime:
47406 averageTime: 4740.6 averageTimeExMinMax: 5238.125 averagePerSecond:
0.21094376239294602 averagePerSecondExMinMax: 0.1909080062045102 unit:
millis startTime: 1173109114265 lastSampleTime: 1173109161671 description:
Time taken to process a message (thoughtput rate) }
        expiredMessageCount{ count: 0 unit: count startTime: 1173109114265
lastSampleTime: 1173109114265 description: Number of expired messages }
        messageWaitTime{ count: 0 maxTime: 0 minTime: 0 totalTime: 0
averageTime: 0.0 averageTimeExMinMax: 0.0 averagePerSecond: 0.0
averagePerSecondExMinMax: 0.0 unit: millis startTime: 1173109114265
lastSampleTime: 1173109114265 description: Time spent by a message before
being delivered }
      }
    }
    consumers {
    }
  }
}
[INFO] FailoverTransport - -Successfully reconnected to
tcp://localhost:22222


There were reports of MySQL not working with Master/Slave (due to the
exclusive locking not working) - which was later fixed, but it might
be MySQL version dependent.






James.Strachan wrote:
> 
> On 3/5/07, Matías Cobiella <matiascobiella@yahoo.com> wrote:
>>
>> Thanks by your response
>>
>> I'm really sure ConsumerTool have the url =
>> failover:(tcp://localhost:11111,tcp://localhost:22222).
>> And I'm running the ConsumerTool.java and the ProducerTool from the
>> Eclipse
>> IDE. Could be this the problem?
> 
> I wouldn't have thought so. I wonder, which version of MySQL are you
> using - am wondering if the Master/Slave stuff isn't completely
> working. e.g. does the log of the brokers show what you think is
> happening.
> 
> i.e. the broker log clearly shows the slave doesn't think its the
> master until the master dies?
> 
> There were reports of MySQL not working with Master/Slave (due to the
> exclusive locking not working) - which was later fixed, but it might
> be MySQL version dependent.
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Failover-problem-with-ConsumerTool-and-JDBC-Master-SLAVE-tf3336396s2354.html#a9314242
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message