[jgroups-users] Migration Question/Issue
Questions/problems related to using JGroups via javagroups-users <[email protected]> Fri, 5 Oct 2018 20:33:13 +0000
| Newsgroups | gmane.comp.java.javagroups.general |
|---|---|
| Message-ID | <mailman.27818.1538784296.1387.javagroups-users@lists.sourceforge.net> |
Good Day,
We are currently attempting to migrate from 3.3.3 to 4.0.15. I couldn't find any migration guides so the following is our previous setup and current setup. What we are experiencing is that when a participant leaves the cluster when it's a hard crash(kill jvm), some of the participants are not notified(Coordinator is) and still think other members exist and attempt to send messages to them locking up the application until the timeout of 2 minutes occurs. When this happens on the Coordinator, the oldest participant is notified and takes over Coordinator role, however the other participants do not get notified. In our setup, we use the Message Dispatcher to send sync or asyn messages to and from 1 or 1 to many members. Within our ClusterMembershipListener, we only have application code within the viewAccepted method of the interface. Any help would be greatly appreciated.
Testing Scenario
* Scenarios 1
* Start APP A (Coordinator)
* Start APP B (Participant)
* Start APP C (Participant)
* Kill APP C(Hard kill of process)
* Verify A can talk to B
* Verify B can talk to A
* Scenarios 2
* Start APP A (Coordinator)
* Start APP B (Participant)
* Start APP C (Participant)
* Kill APP A(Hard kill of process)
* Verify B takes over as Coordinator
* Verify B can talk to C
* Verify C can talk to B
Issues
* Scenario 1
* Works
* Applications on the same machine
* Fails
* Applications are on other machines in same network
* APP C still thinks that APP A is coordinator, viewAccepted not invoked
* Possible Fix
* Tried setting on GMS - use_delta_views = FALSE
* This seemed to fix the issue but then ran Scenario 2 still an issue
* Scenario 2
* Works
* Applications on the same machine
* Fails
* Applications are on other machines in same network
* APP B does take over as Coordinator but then is constantly sending Suspect messages to APP A
* APP C still thinks App A is Coordinator and continues to send messages to it
Migration Changes Made
* ENCRYPT changed to ASYM_ENCRYPT
* The previous location of encrypt was not working due to key exchange. It was moved up before nakack2 and seems to work in our testing now.
* UNICAST2 changed to UNICAST3
* Address is no longer serializable, so we now store the mostSig and leastSig values in the objects. We have many messages that include objects that store the Address of where the object comes from. This is so we know who to send specific message to. After this change messages are sent and received successfully
* Removed UFC Protocol as logging stated it is not necessary and is safe to remove.
* Changed how the protocol is supplied to channel as old way is no longer supported.
3.3.3 (Custom Protocol Stack Initialization)
channel = new JChannel(false);
channel.setName(SystemInfo.getName());
channel.enableStats(ClusterConstants.STATS_ENABLED);
ProtocolStack stack = new ProtocolStack();
stack.enableStats(ClusterConstants.STATS_ENABLED);
channel.setProtocolStack(stack);
stack.addProtocol(getTCPProtocol());
if (initialMembers != null) {
stack.addProtocol(getTCPPingProtocol());
}
stack.addProtocol(getFDSockProtocol());
stack.addProtocol(getFDAllProtocol());
stack.addProtocol(getVerifySuspectProtocol());
stack.addProtocol(getNakack2Protocol());
stack.addProtocol(getUnicast2Protocol());
stack.addProtocol(getCentralLockProtocol());
stack.addProtocol(getStableProtocol());
stack.addProtocol(getAuthProtocol());
stack.addProtocol(getGMSProtocol());
stack.addProtocol(getUfcProtocol());
stack.addProtocol(getMfcProtocol());
stack.addProtocol(getEncryptProtocol());
stack.addProtocol(getFrag2Protocol());
stack.init();
channel.setDiscardOwnMessages(true);
dispatcher = new MessageDispatcher(channel, null,
new ClusterMembershipListener(), new ClusterMessageReceiver());
lockService = new LockService(channel);
channel.connect(ClusterConstants.CLUSTER_NAME);
4.0.15 (Custom Protocol Stack Initialization)
List<Protocol> protocols = new ArrayList<Protocol>(14);
protocols.add(getTCPProtocol());
if (initialMembers != null) {
protocols.add(getTCPPingProtocol());
}
protocols.add(getFDSockProtocol());
protocols.add(getFDAllProtocol());
protocols.add(getVerifySuspectProtocol());
protocols.add(getAsymEncryptProtocol());
protocols.add(getNakack2Protocol());
protocols.add(getUnicast3Protocol());
protocols.add(getCentralLockProtocol());
protocols.add(getStableProtocol());
protocols.add(getAuthProtocol());
protocols.add(getGMSProtocol());
protocols.add(getMfcProtocol());
protocols.add(getFrag2Protocol());
channel = new JChannel(protocols);
channel.setName(SystemInfo.getName());
channel.setStats(ClusterConstants.STATS_ENABLED);
channel.getProtocolStack().enableStats(ClusterConstants.STATS_ENABLED);
channel.setDiscardOwnMessages(true);
dispatcher = new MessageDispatcher(channel,
new ClusterMessageReceiver());
dispatcher.setMembershipListener(new ClusterMembershipListener());
lockService = new LockService(channel);
channel.connect(ClusterConstants.CLUSTER_NAME);
CJ Binder
_______________________________________________
javagroups-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javagroups-users