Elasticsearch Unassigned Shards: Why and How to Fix

Share
Workaround available Self-hosted, Elastic Cloud Updated November 15, 2026Based on 2 user reportsHow we research

Quick answer

Shards stay unassigned when no node is allowed to host them: too few nodes, full disks, disabled allocation or filtering rules. GET _cluster/allocation/explain names the exact reason.

Most likely fix: Ask Elasticsearch why

How to fix it

Try these in order — the most common fix is first.

  1. 1. Ask Elasticsearch why

    1. Run GET _cluster/allocation/explain, optionally with {"index":"my-index","shard":0,"primary":false}
    2. Read the decider that returned NO
    Did this fix it?
  2. 2. Retry and reset

    1. POST _cluster/reroute?retry_failed=true to retry shards that hit max allocation retries
    2. Review index and cluster settings for stale allocation filters
    Did this fix it?
  3. 3. Fix capacity

    1. Add a data node to the same tier or lower index.number_of_replicas
    2. Free disk with GET _cat/allocation, delete old indices, force merge or shrink read-only indices
    Did this fix it?

Symptoms

GET _cat/shards shows UNASSIGNED; cluster health is yellow or red; unassigned_shards is above zero.

Why it happens

  • Replica count higher than available data nodes
  • Disk watermarks exceeded
  • cluster.routing.allocation.enable set to none
  • Allocation filtering or awareness settings that match no node
  • Lost primary with no valid copy

This guide also covers

  • elasticsearch unassigned shards
  • elasticsearch allocation explain
  • elasticsearch shards not allocating

Still not working?

If Elasticsearch keeps failing, you're not alone. See every Elasticsearch problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other Elasticsearch errors

All 10 Elasticsearch errors and fixes →