There is another weird thing: 
I tried that starting ActiveMQ in a single process named AMQ, and let GUARD
watch it and restart it when AMQ exit abnormally.

In this senario, GUARD just do one thing. monitor all the other processes
and restart them if needed.

Then amazing things happen: no matter how many time AMQ, GUARD, MDP,
SECURITY and EMS have been restarted or in what sequence they are restarted,
FAILOVER works perfectly. Every time AMQ is restarted, the other four
process CAN detect it and reconnect to new ActiveMQ Server, LOG print:

2016-02-02 08:55:19,398 WARN
[org.apache.activemq.transport.failover.FailoverTransport] - Transport
(tcp://127.0.0.1:61616) failed, reason:  java.net.SocketException:
Connection reset, attempting to automatically reconnect 
2016-02-02 08:55:23,692 INFO
[org.apache.activemq.transport.failover.FailoverTransport] - Successfully
reconnected to tcp://QH-20151209WEVY:61616

I CAN'T TELL WHY THIS HAPPEN. THIS REALLY CONFUSE ME.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Connection-lost-when-ActiveMQ-shutdown-and-restart-twice-tp4706711p4706767.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to