You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Matías Cobiella <ma...@yahoo.com> on 2007/03/05 13:45:30 UTC

Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

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?




James.Strachan wrote:
> 
> Are you sure you're using the failover: url on the consumer?
> 
> On 3/2/07, Matías Cobiella <ma...@yahoo.com> wrote:
>>
>> Hi,
>>
>> I have the following environment:
>>
>> Two Brokers (localhost:11111 and localhost:22222) in a JDBC MASTER-SLAVE
>> (MySQL) configuration. The
>> ProducerTool and the ConsumerTool uses
>> failover:(tcp://localhost:11111,tcp://localhost:22222)
>>
>> 1) The BrokerA starts and becomes the MASTER.
>> 2) The BrokerB starts and becomes the SLAVE.
>> 3) The ConsumerTool is started and is listening on a queue of the MASTER.
>> 4) The ProducerTool is started and it sends messages to the queue of the
>> MASTER and the ConsumerTool receive them.
>> 5) MASTER is shutdown, then the SLAVE Becomes MASTER.
>> 6) ProducerTool failover to the NEW MASTER and keeps sending messages.
>> 7) But ConsumerTool crashes with the following error.
>>
>> [INFO] FailoverTransport - -Successfully reconnected to
>> tcp://localhost:11111
>> Received: Message: 0 sent at: Fri Mar 02 19:15:20 GMT-03:00 ...
>> Received: Message: 1 sent at: Fri Mar 02 19:15:26 GMT-03:00 ...
>> Received: Message: 2 sent at: Fri Mar 02 19:15:31 GMT-03:00 ...
>> Received: Message: 3 sent at: Fri Mar 02 19:15:36 GMT-03:00 ...
>> Received: Message: 4 sent at: Fri Mar 02 19:15:41 GMT-03:00 ...
>> java.net.SocketException: Connection reset
>>         at java.net.SocketInputStream.read(SocketInputStream.java:168)
>>         at
>> org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:49)
>>         at
>> org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:56)
>>         at java.io.DataInputStream.readInt(DataInputStream.java:353)
>>         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.net.SocketException: Connection reset
>> <java.net.SocketException: Connection reset>
>>
>>
>> Does anybody knows why the ConsumerTool doesn't failover to the new
>> MASTER?
>>
>> I'm using the 4.2 SNAPSHOP.
>>
>> Thanks in advance.
>>
>> Matías.
>> --
>> View this message in context:
>> http://www.nabble.com/Failover-problem-with-ConsumerTool-and-JDBC-Master-SLAVE-tf3336396s2354.html#a9278795
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> 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#a9310828
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by Matías Cobiella <ma...@yahoo.com>.
Hi,

Once when I started to use AMQ I've tried to use different jar versions and
I got the following error:

16:49:27,468 INFO  [STDOUT] java.lang.IllegalArgumentException: Invalid
version: 2, could not load org.apache.activemq.openwire.v2.MarshrFactory

But this time with this test I think I've used the same jar versions :=)

Regards, Matías.


Hiram Chirino wrote:
> 
> It's sounds like your now using the same jar versions between the 2
> environments.
> 
> On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>>
>> Well, via Ant the ConsumerTool reconnects and keeps receiveing the
>> messages!!!!!!!
>>
>> FYI, via Eclipse, if you have two Brokers started (not MASTER-SLAVE)
>> ConsumerTool doesn't reconnects from BrokerA to BrokerB
>>
>> Thanks by your help!!
>>
>> Matías.
>>
>>
>>
>>
>> James.Strachan wrote:
>> >
>> > On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>> >>
>> >> I've never used Ant. I'll try to do the same test from Ant and I'll
>> tell
>> >> you
>> >> the results...
>> >
>> > There's an Ant file that ships with the distro all configured to run
>> > the examples
>> > --
>> >
>> > 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#a9318503
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Regards,
> Hiram
> 
> Blog: http://hiramchirino.com
> 
> 

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


Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by Hiram Chirino <hi...@hiramchirino.com>.
It's sounds like your now using the same jar versions between the 2
environments.

On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>
> Well, via Ant the ConsumerTool reconnects and keeps receiveing the
> messages!!!!!!!
>
> FYI, via Eclipse, if you have two Brokers started (not MASTER-SLAVE)
> ConsumerTool doesn't reconnects from BrokerA to BrokerB
>
> Thanks by your help!!
>
> Matías.
>
>
>
>
> James.Strachan wrote:
> >
> > On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
> >>
> >> I've never used Ant. I'll try to do the same test from Ant and I'll tell
> >> you
> >> the results...
> >
> > There's an Ant file that ships with the distro all configured to run
> > the examples
> > --
> >
> > 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#a9318503
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by James Strachan <ja...@gmail.com>.
On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>
> Well, via Ant the ConsumerTool reconnects and keeps receiveing the
> messages!!!!!!!

So the distro is working fine then.

> FYI, via Eclipse, if you have two Brokers started (not MASTER-SLAVE)
> ConsumerTool doesn't reconnects from BrokerA to BrokerB

Sounds like you've something screwy in your eclipse project.

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by Matías Cobiella <ma...@yahoo.com>.
Well, via Ant the ConsumerTool reconnects and keeps receiveing the
messages!!!!!!!

FYI, via Eclipse, if you have two Brokers started (not MASTER-SLAVE)
ConsumerTool doesn't reconnects from BrokerA to BrokerB

Thanks by your help!!

Matías.




James.Strachan wrote:
> 
> On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>>
>> I've never used Ant. I'll try to do the same test from Ant and I'll tell
>> you
>> the results...
> 
> There's an Ant file that ships with the distro all configured to run
> the examples
> -- 
> 
> 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#a9318503
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by James Strachan <ja...@gmail.com>.
On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>
> I've never used Ant. I'll try to do the same test from Ant and I'll tell you
> the results...

There's an Ant file that ships with the distro all configured to run
the examples
-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by Matías Cobiella <ma...@yahoo.com>.
I've never used Ant. I'll try to do the same test from Ant and I'll tell you
the results...

Thanks.





James.Strachan wrote:
> 
> I'm totally stumped :)
> 
> One final idea - do you get exactly the same behaviour runing via Ant
> as via Eclipse?
> 
> On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>>
>> Does the consumer fail?
>>
>> Yes, the ConsumerTool.java terminates with that error.
>>
>> Or does it manage to reconnect & just never
>> receive any more messages?
>>
>> ConsumerTool doesn't manage reconnect at all.
>>
>>
>>
>> James.Strachan wrote:
>> >
>> > On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>> >>
>> >> Here is.
>> >>
>> >> Connecting to URL:
>> failover:(tcp://localhost:11111,tcp://localhost:22222)
>> >> Consuming queue: TOOL.DEFAULT
>> >> Using a non-durable subscription
>> >> [INFO] FailoverTransport - -Successfully reconnected to
>> >> tcp://localhost:11111
>> >> Received: Message: 0 sent at: Mon Mar 05 12:54:10 GMT-03:00 ...
>> >> Received: Message: 1 sent at: Mon Mar 05 12:54:16 GMT-03:00 ...
>> >> Received: Message: 2 sent at: Mon Mar 05 12:54:21 GMT-03:00 ...
>> >> java.net.SocketException: Connection reset
>> >>         at java.net.SocketInputStream.read(SocketInputStream.java:168)
>> >>         at
>> >>
>> org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:49)
>> >>         at
>> >>
>> org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:56)
>> >>         at java.io.DataInputStream.readInt(DataInputStream.java:353)
>> >>         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.net.SocketException: Connection reset
>> >> <java.net.SocketException: Connection reset>
>> >
>> >
>> > --
>> >
>> > 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#a9316272
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> 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#a9316673
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by James Strachan <ja...@gmail.com>.
I'm totally stumped :)

One final idea - do you get exactly the same behaviour runing via Ant
as via Eclipse?

On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>
> Does the consumer fail?
>
> Yes, the ConsumerTool.java terminates with that error.
>
> Or does it manage to reconnect & just never
> receive any more messages?
>
> ConsumerTool doesn't manage reconnect at all.
>
>
>
> James.Strachan wrote:
> >
> > On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
> >>
> >> Here is.
> >>
> >> Connecting to URL: failover:(tcp://localhost:11111,tcp://localhost:22222)
> >> Consuming queue: TOOL.DEFAULT
> >> Using a non-durable subscription
> >> [INFO] FailoverTransport - -Successfully reconnected to
> >> tcp://localhost:11111
> >> Received: Message: 0 sent at: Mon Mar 05 12:54:10 GMT-03:00 ...
> >> Received: Message: 1 sent at: Mon Mar 05 12:54:16 GMT-03:00 ...
> >> Received: Message: 2 sent at: Mon Mar 05 12:54:21 GMT-03:00 ...
> >> java.net.SocketException: Connection reset
> >>         at java.net.SocketInputStream.read(SocketInputStream.java:168)
> >>         at
> >> org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:49)
> >>         at
> >> org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:56)
> >>         at java.io.DataInputStream.readInt(DataInputStream.java:353)
> >>         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.net.SocketException: Connection reset
> >> <java.net.SocketException: Connection reset>
> >
> >
> > --
> >
> > 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#a9316272
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by Matías Cobiella <ma...@yahoo.com>.
Does the consumer fail? 

Yes, the ConsumerTool.java terminates with that error.

Or does it manage to reconnect & just never
receive any more messages?

ConsumerTool doesn't manage reconnect at all.



James.Strachan wrote:
> 
> On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>>
>> Here is.
>>
>> Connecting to URL: failover:(tcp://localhost:11111,tcp://localhost:22222)
>> Consuming queue: TOOL.DEFAULT
>> Using a non-durable subscription
>> [INFO] FailoverTransport - -Successfully reconnected to
>> tcp://localhost:11111
>> Received: Message: 0 sent at: Mon Mar 05 12:54:10 GMT-03:00 ...
>> Received: Message: 1 sent at: Mon Mar 05 12:54:16 GMT-03:00 ...
>> Received: Message: 2 sent at: Mon Mar 05 12:54:21 GMT-03:00 ...
>> java.net.SocketException: Connection reset
>>         at java.net.SocketInputStream.read(SocketInputStream.java:168)
>>         at
>> org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:49)
>>         at
>> org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:56)
>>         at java.io.DataInputStream.readInt(DataInputStream.java:353)
>>         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.net.SocketException: Connection reset
>> <java.net.SocketException: Connection reset>
> 
> 
> -- 
> 
> 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#a9316272
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by James Strachan <ja...@gmail.com>.
On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>
> Here is.
>
> Connecting to URL: failover:(tcp://localhost:11111,tcp://localhost:22222)
> Consuming queue: TOOL.DEFAULT
> Using a non-durable subscription
> [INFO] FailoverTransport - -Successfully reconnected to
> tcp://localhost:11111
> Received: Message: 0 sent at: Mon Mar 05 12:54:10 GMT-03:00 ...
> Received: Message: 1 sent at: Mon Mar 05 12:54:16 GMT-03:00 ...
> Received: Message: 2 sent at: Mon Mar 05 12:54:21 GMT-03:00 ...
> java.net.SocketException: Connection reset
>         at java.net.SocketInputStream.read(SocketInputStream.java:168)
>         at
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:49)
>         at
> org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:56)
>         at java.io.DataInputStream.readInt(DataInputStream.java:353)
>         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.net.SocketException: Connection reset
> <java.net.SocketException: Connection reset>

Does the consumer fail? Or does it manage to reconnect & just never
receive any more messages?

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by Matías Cobiella <ma...@yahoo.com>.
Here is.

Connecting to URL: failover:(tcp://localhost:11111,tcp://localhost:22222)
Consuming queue: TOOL.DEFAULT
Using a non-durable subscription
[INFO] FailoverTransport - -Successfully reconnected to
tcp://localhost:11111
Received: Message: 0 sent at: Mon Mar 05 12:54:10 GMT-03:00 ...
Received: Message: 1 sent at: Mon Mar 05 12:54:16 GMT-03:00 ...
Received: Message: 2 sent at: Mon Mar 05 12:54:21 GMT-03:00 ...
java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:168)
	at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:49)
	at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:56)
	at java.io.DataInputStream.readInt(DataInputStream.java:353)
	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.net.SocketException: Connection reset
<java.net.SocketException: Connection reset>





James.Strachan wrote:
> 
> Could you show your entire log of the ConsumerTool please?
> 
> 
> On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>>
>> Yes, "Becoming the master..." line appears in the SLAVE log only when the
>> MASTER fails
>>
>>
>>
>> James.Strachan wrote:
>> >
>> > On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>> >>
>> >> 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
>> >
>> > Just to be completely sure - the above "Becoming the master" line in
>> > the log of the slave only appears when the master fails right?
>> >
>> >
>> > --
>> >
>> > 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#a9314830
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> 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#a9315441
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by James Strachan <ja...@gmail.com>.
Could you show your entire log of the ConsumerTool please?


On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>
> Yes, "Becoming the master..." line appears in the SLAVE log only when the
> MASTER fails
>
>
>
> James.Strachan wrote:
> >
> > On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
> >>
> >> 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
> >
> > Just to be completely sure - the above "Becoming the master" line in
> > the log of the slave only appears when the master fails right?
> >
> >
> > --
> >
> > 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#a9314830
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by Matías Cobiella <ma...@yahoo.com>.
Yes, "Becoming the master..." line appears in the SLAVE log only when the
MASTER fails



James.Strachan wrote:
> 
> On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>>
>> 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
> 
> Just to be completely sure - the above "Becoming the master" line in
> the log of the slave only appears when the master fails right?
> 
> 
> -- 
> 
> 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#a9314830
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by James Strachan <ja...@gmail.com>.
On 3/5/07, Matías Cobiella <ma...@yahoo.com> wrote:
>
> 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

Just to be completely sure - the above "Becoming the master" line in
the log of the slave only appears when the master fails right?


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by Matías Cobiella <ma...@yahoo.com>.
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 <ma...@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.


Re: [VOTE RESULT] Failover problem with ConsumerTool and JDBC Master-SLAVE

Posted by James Strachan <ja...@gmail.com>.
On 3/5/07, Matías Cobiella <ma...@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/