Hello together,

I have one client and one server, it's no problem to kill the client and restart it, it always has access to the server's cache after the restart is finished.

When I stop the server (to simulate a full cluster shutdown) and restart it after waiting for a couple of seconds the client cannot reconnect, because the cache is closed:

java.lang.IllegalStateException: class org.apache.ignite.internal.processors.cache.CacheStoppedException: Failed to perform cache operation (cache is stopped): default

I tried to register a reconnect listener to recreate the cache, but I'm not successful:

ignite.events().localListen((IgnitePredicate<DiscoveryEvent>) discoveryEvent -> {
    log.warn("### Reactivating ignite caches");
    ignite.active(true);

log.warn("### Test get: {}", ignite.getOrCreateCache("default").get("hallo"));

    return true;
}, EventType.EVT_CLIENT_NODE_RECONNECTED);

It seems like it's entering the method, because I can see the Reactivation warning followed by this message:

2017-12-24 00:01:19.362 INFO 11054 --- [vent-worker-#46] o.a.i.i.p.c.GridClusterStateProcessor : Sending activate request from node [id=43e52f92-a466-4c39-ad8b-3de9b1367346, topVer=AffinityTopologyVersion [topVer=2, minorTopVer=0], client=true, daemon=false]

Then it seems to be stuck somehow, because I don't see my test get. Would be cool if someone could point me in the right direction.

Cheers
Wolfram

Reply via email to