activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akhil <akh...@gmail.com>
Subject Re: Test-case for problem with connections not refreshing when pooled with failover
Date Wed, 21 Sep 2016 03:54:06 GMT
Hi Jason , 

I am late to the failover party and i am facing the same issue. Probably
mine is a different use case where i am intentionally putting down one of
the failover broker whether all the consumers and producers are getting
switching to the active broker remaining in the failover. I am using Broker
A and Broker B and sharing the common storage in which one of them is master
and slave at the same time . so i am starting with the broker a as master
which acquired db lock and slave is running but it is just like a back up
mode. My test started with Broker A as master -- 2 threads running in local
and hitting to the failover brokers and one thread is producer and the other
one is consumer. using this failover string as you stated above.

failover:(tcp://10.172.6.46:61616,tcp://10.172.107.57:61616)?initialReconnectDelay=20&maxReconnectDelay=500&randomize=false&maxReconnectAttempts=2

Producer and consumer working fine in this case. To add fun to the test , I
have made Broker A down and broker B became master and producer and consumer
ended up with this connection reset

23:48:10.500 [ActiveMQ Transport: tcp:///10.172.107.57:61616] DEBUG
o.a.a.transport.tcp.TcpTransport - Stopping transport
tcp:///10.172.107.57:61616
23:48:10.502 [ActiveMQ Transport: tcp:///10.172.107.57:61616] WARN 
o.a.a.t.failover.FailoverTransport - Transport failed to
tcp://10.172.107.57:61616 , attempting to automatically reconnect due to:
java.net.SocketException: Connection reset
23:48:10.510 [ActiveMQ Transport: tcp:///10.172.107.57:61616] DEBUG
o.a.a.t.failover.FailoverTransport - Transport failed with the following
exception:
java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:209)
~[na:1.8.0_51]
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
~[na:1.8.0_51]
	at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
~[activemq-all-5.1.0.jar:na]
	at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
~[activemq-all-5.1.0.jar:na]
	at java.io.DataInputStream.readInt(DataInputStream.java:387) ~[na:1.8.0_51]

Before using your failover string i have used normal one with the randomize
flag , it was throwing up the inactivity monitor and never ever reconnecting
to the new master broker. This happens only in consumer thread and producer
gets ported successfully.

I really appreciate your help on this ..I have to have clues atleast what is
really going on this ..!! I am using activemq version of 5.11. and tried on
5.13 as well.

Thanks,
Akhil.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Timeout-and-Failover-on-a-queue-tp2355377p4716677.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message