Failed to find reentrant lock with given name Ignite

Full text of the exception in Apache Ignite:

SEVERE: <ignite-sys-atomic-cache@default-volatile-ds-group> 
Failed to compare and set: o.a.i.i.processors.datastructures.GridCacheLockImpl$Sync$1@263fbc6 class org.apache.ignite.IgniteCheckedException: 
Failed to find reentrant lock with given name: <name_here>
SEVERE: <ignite-sys-atomic-cache@default-volatile-ds-group> 
Lock.unlock() is called in illegal state [callerNodeId=6686427d-f221-4364-61b0-e1df293e938d, ownerNodeId=null, callerThreadId=323, ownerThreadId=0, lockState=0]

The code that uses the reentrant lock looks something like this:

IgniteLock lock = ignite.reentrantLock(...);
try {
} finally {

Check that when creating a lock, the last argument = true is passed to the reentrantLock method:

ignite.reentrantLock(..., true);

If the error is still repeated, then this is a bug: It appears when one of the server nods creates a lock and falls out of the topology. From the history of the Jira discussion, it is not entirely clear what happened to the bug in the end, but even in version 2.6.0 it can be obtained.

In my case, the appearance of this bug pointed me to the wrong topology. I assumed that I had 1 ignite server and 5 ignite clients running. It turned out that all clients were servers. But in the case of multiple server nodes, you need to found the workarounds.

If you still have any questions, feel free to ask me in the comments under this article, or write me on

If I saved your day, you can support me :)

Leave a Reply

Your email address will not be published.