Thanks for confirming that (at least at broker startup) the shared-filesystem locking is working. When you stop the master broker, do you see lines in the slave log at that exact time saying that it has acquired the lock and become the master? And after you shut down the original master, when you start it again, do you see this same line saying it couldn't acquire the lock and was therefore the slave? If any of those things isn't working, something is wrong and we need to address that first, before we spend any effort on the client code.
One question about the client, though: if you start both brokers and connect with your M1,M2 URI, can you also connect with your M2,M1 URI? Does the order of the failover URI matter when both brokers are up, or only after M1 is taken down? One other question: when you kill M1, how do you do that, and how do you know that the process has actually stopped? Is there any possibility that the M1 broker might still be running after you tr to stop it? Tim Tim On Jul 18, 2017 4:09 AM, "akpuvvada" <[email protected]> wrote: > Hi Tim, > I can see logs indicating that lock is identified, please see below. > > 2017-07-14 03:18:14,428 | INFO | Database > /tibco_installables/ActiveMQ/DataStore/kahadb/lock is locked by another > server. This broker is now in slave mode waiting a lock to be acquired | > org.apache.activemq.store.SharedFileLocker | main > > > So, this is not a file system issues. > > My issue is: > - When I first bring up the servers, M1 first and M2 seconds. M1 is taking > up as Primary and M2 as Secondary. > - I am using M1:port,M2:port failover URL. > - It is working fine > However, the issue is coming up when the Primary is stopped, the same above > failover URL is not working. > If I change the URL to M2:port,M1:port, it is working. > > > > > -- > View this message in context: http://activemq.2283324.n4. > nabble.com/Active-MQ-Master-Slave-Config-Not-working- > tp4728550p4728622.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
