I have two nodes/applications that is connected via jgroups, pointing to two database.
Once I up the two applications, if I trigger activate/deactivate from the first node, everything is fine, I can deactivate and activate it back unlimited times. But after that, if I try to call "deactivate" on the second node, and then activate it back, the activate process will takes forever.
In the primary node, I see this in DEBUG:
2015-04-13 18:27:57,261 DEBUG net.sf.hajdbc.distributed.jgroups.JGroupsCommandDispatcher [JGroupsCommandDispatcher.java:225] Received CoordinatorAcquireLockCommand(writeLock()) from company-app-dr-55817
and secondary node I see this in DEBUG:
2015-04-13 18:27:57,301 DEBUG net.sf.hajdbc.distributed.jgroups.JGroupsCommandDispatcher [JGroupsCommandDispatcher.java:225] Received MemberAcquireLockCommand(writeLock()) from company-app-27881
It seems that the secondary node is asking for the primary node to perform a lock, but it just hangs there.
After a restart of both the applications then the activate/deactivate works again.
Last edit: Yee_Keat Phuah 2015-04-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have two nodes/applications that is connected via jgroups, pointing to two database.
Once I up the two applications, if I trigger activate/deactivate from the first node, everything is fine, I can deactivate and activate it back unlimited times. But after that, if I try to call "deactivate" on the second node, and then activate it back, the activate process will takes forever.
I am using ha-jdbc 3.0.3 with jgroups 3.4.3.
my ha-jdbc-db.xml for the first node
and for the second node
my jgroups.xml for both the nodes
In the primary node, I see this in DEBUG:
2015-04-13 18:27:57,261 DEBUG net.sf.hajdbc.distributed.jgroups.JGroupsCommandDispatcher [JGroupsCommandDispatcher.java:225] Received CoordinatorAcquireLockCommand(writeLock()) from company-app-dr-55817
and secondary node I see this in DEBUG:
2015-04-13 18:27:57,301 DEBUG net.sf.hajdbc.distributed.jgroups.JGroupsCommandDispatcher [JGroupsCommandDispatcher.java:225] Received MemberAcquireLockCommand(writeLock()) from company-app-27881
It seems that the secondary node is asking for the primary node to perform a lock, but it just hangs there.
After a restart of both the applications then the activate/deactivate works again.
Last edit: Yee_Keat Phuah 2015-04-13
It seems like the error is when we try to activate a DB from a non coordinator. After trying out with tcp.xml, and removing UNICAST3 as what I read from here:
https://sourceforge.net/p/ha-jdbc/discussion/383397/thread/9b3dc233/
The problem is gone.