DBAtlas · Database operations atlas

shard_lock_obtain_failed_exception: Obtaining shard lock timed out

Elasticsearch

What does it mean?

Elasticsearch could not obtain the local directory lock (shard lock) required to operate on a shard within the timeout. The shard could not be started or reassigned.

Why does it happen?

A previous copy of the same shard (after close/relocation) has not yet released the lock; slow/hung I/O; disk problems; or stale shard state not cleaned up after a fast node restart. Usually transient, but if persistent the shard stays UNASSIGNED.

How to fix it

Check why the shard is unassigned: GET _cluster/allocation/explain. In most cases the lock is released shortly and the cluster retries on its own; if needed, trigger reallocation with POST _cluster/reroute?retry_failed=true. If persistent, examine the affected node's logs for I/O/disk errors and verify disk health. A clean restart of the problematic node can clear the lock.

Open in DBAtlas →

More from this engine