Search code examples
javahazelcast

WrongTargetException in Hazelcast cluster


I was running a POC with two members of hazelcast cluster, with 3.4.1 version of hazelcast. I observed a strange behavior, where one member was continuously throwing WrongTargetException. It was a rare scenario which I was able to replicate with following sequence of events :

Assume I am running cluster with two members say X and Y.

  1. Unplugged Y from the the cluster so it becomes unresponsive.
  2. X thinks Y is not responding so it remove it from clusters.
  3. Plugged in Y again, Y assumes it has not received any response/heart-beat from X, so think X is dead, and it kicked X out from the cluster.
  4. X begins to throw WrongTargetException soon.

While searching on google I find same issue is described here https://github.com/hazelcast/hazelcast/issues/3395.

So would like to know if this has been fixed now, and what is preferred version that should be used. Please consider that I am already using 3.4.1 for other applications as well, so don't want to do a massive change while upgrading to latest version.


Solution

  • It looks like the issue https://github.com/hazelcast/hazelcast/issues/3395 is fixed in the version 3.7.

    So you can try with the latest Hazelcast version: 4.0.1. Or if you don't want to upgrade the major version, then try 3.12.6.