# Replica shards of newly created indices remain UNASSIGNED

**URL:** <https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459>\
**Category:** Elasticsearch\
**Created:** [June 25, 2025, 6:26am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459 "2025-06-25T06:26:07Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![onel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onel/32/143827_2.png) [@onel](https://discuss.elastic.co/u/onel)\
**Post date:** [June 25, 2025, 6:26am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/1 "2025-06-25T06:26:07Z")

</div>

hello

We haven’t experienced this issue before, but recently we noticed that **the primary shards of rollover-created indices are allocated normally, while the replica shards always remain in an UNASSIGNED state**. We created a test index to verify this, and the same issue occurred—only the replica shards are not being allocated.

Below is the allocation explain output for the replica shard of the test index:

```auto
"index": "test-index-replica",
"shard": 0,
"primary": false,
"current_state": "unassigned",
"unassigned_info": {
  "reason": "INDEX_CREATED",
  "at": "2025-06-23T",
  "last_allocation_status": "no_attempt"
},
"can_allocate": "yes",
"allocate_explanation": "Elasticsearch can allocate the shard.",
"target_node": {
  "id": "4haAS8CuT-6xhgA",
  "name": "data5",
  "transport_address": "IP:9300",
  "attributes": {
    "transform.config_version": "10.0.0",
    "xpack.installed": "true",
    "ml.config_version": "12.0.0"
  },
  "roles": [
    "data",
    "data_cold",
    "data_content",
    "data_frozen",
    "data_hot",
    "data_warm",
    "ingest",
    "remote_cluster_client",
    "transform"
  ]
},
"node_allocation_decisions": [
  {
    "node_id": "4haAS8CuT-6xhgA",
    "node_name": "data5",
    "transport_address": "IP:9300",
    "node_attributes": {
      "transform.config_version": "10.0.0",
      "xpack.installed": "true",
      "ml.config_version": "12.0.0"
    },
    "roles": [
      "data",
      "data_cold",
      "data_content",
      "data_frozen",
      "data_hot",
      "data_warm",
      "ingest",
      "remote_cluster_client",
      "transform"
    ],
    "node_decision": "yes",
    "weight_ranking": 3
  }
]

```

However, if we manually route the replica shard to the target node as shown below, it gets allocated successfully:

```auto
POST /_cluster/reroute
{
  "commands": [
    {
      "allocate_replica": {
        "index": "test-index-replica",
        "shard": 0,
        "node": "data5"
      }
    }
  ]
}

```

There is **no disk watermark issue** or capacity limitation on the target node.(The node has 1TB of free disk space available.)  
Also, there are no ongoing recovery or balancing operations, and there are no pending tasks.  
Our Elasticsearch cluster is running version **8.14.3**.  
We would appreciate any assistance or guidance to resolve this issue.

Thank you.

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [June 25, 2025, 6:34am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/2 "2025-06-25T06:34:25Z")

</div>

Hello @onel

Welcome to the community!!

Your elastic version is 8.14.3 , could you please share below information ?

1. Total number of data nodes in your cluster?
2. Index settings (primary + replicas) for this index ?

I found one blog related to similar issue :

> [@Unassigned replica shards with reason as INDEX\_CREATED](https://discuss.elastic.co/t/unassigned-replica-shards-with-reason-as-index-created/237845/4):
>
> hey @Vinayak_Sapre after i made changes for total\_shards\_per\_node, still out of 14 shards, one replica shard remains unassigned after index rollover. this is not happening after every rollover, but happening frequently! "6" : [ { "state" : "STARTED", "primary" : true, "node" : "xxxxxxxxxxxxxxxx", "relocating\_node" : null, "shard" : 6, "index" : "pm2-logs-2020.06.23-000172", "allocati…

Thanks!!

---

<div class="post-metadata">

**Author:** ![onel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onel/32/143827_2.png) [@onel](https://discuss.elastic.co/u/onel)\
**Post date:** [June 25, 2025, 6:45am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/3 "2025-06-25T06:45:07Z")

</div>

Thank you for your response. However, the issue described in the link you provided does not appear to be related to my environment.  
("index.routing.allocation.total\_shards\_per\_node": -1)

We have **8 data nodes** , and the index was created as follows:

```auto
PUT test-index-replica
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 1
  },
  "mappings": {
    "properties": {
      "message": {
        "type": "text"
      },
      "timestamp": {
        "type": "date"
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [June 25, 2025, 8:45am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/4 "2025-06-25T08:45:01Z")

</div>

> [@onel](#):
>
> Our Elasticsearch cluster is running version **8.14.3**.

Can you reproduce this in 8.18.3? I have a hunch this may be something that got fixed in the last year or so since 8.14 was released.

---

<div class="post-metadata">

**Author:** ![onel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onel/32/143827_2.png) [@onel](https://discuss.elastic.co/u/onel)\
**Post date:** [June 25, 2025, 11:04am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/5 "2025-06-25T11:04:35Z")

</div>

Thank you for your response.

We were not able to reproduce the issue in a test cluster running the same version, so we cannot be certain that upgrading to version 8.18.3 will resolve the problem.

If this issue has been addressed sometime after the release of 8.14, could you please let us know where we can find the release notes or documentation confirming that it has been fixed?

Thank you.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [June 25, 2025, 11:24am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/6 "2025-06-25T11:24:07Z")

</div>

No, sorry, I can't offer enough of my time to do that for you. It's the other way around: you must confirm it is still a problem in 8.18.3 before I can justify spending the time needed to investigate more deeply.

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [June 25, 2025, 11:29am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/7 "2025-06-25T11:29:01Z")

</div>

Hello @onel

As David shared maybe this needs to be checked post upgrade if the issue persists.

Still i am curious to know below information if you can share?

1. For all your indexes in this cluster replicas are not assigned? and this is done manually using POST /\_cluster/reroute?
2. This was working previously & suddenly you are facing this issue?
3. Any changes made at cluster level settings recently?
4. If possible share below information :

`GET /_cluster/health`  
`GET /test-index-replica/_settings`  
`GET /_cat/allocation?v=true`

```auto
GET /_cluster/allocation/explain
{
  "index": "test-index-replica",
  "shard": 0,
  "primary": false
}

```

Please share the value for below setting at cluster level :  
`"cluster.routing.allocation.enable": "all"`

Thanks!!

---

<div class="post-metadata">

**Author:** ![onel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onel/32/143827_2.png) [@onel](https://discuss.elastic.co/u/onel)\
**Post date:** [June 25, 2025, 1:25pm UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/8 "2025-06-25T13:25:48Z")

</div>

Thank you for your response. We will proceed with the upgrade to version 8.18.3 and continue to monitor whether the issue persists.

---

<div class="post-metadata">

**Author:** ![onel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onel/32/143827_2.png) [@onel](https://discuss.elastic.co/u/onel)\
**Post date:** [June 25, 2025, 1:33pm UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/9 "2025-06-25T13:33:58Z")

</div>

- No, the existing replicas are working normally. This issue only occurs with newly created indices—either via rollover or manually created for testing purposes. Replica shards remain unassigned unless they are manually allocated, even though they should be allocated automatically.
- Yes, this issue started occurring suddenly.
- There have been no configuration changes.
- If helpful, please find the following information:

GET /\_cluster/health

```auto
{
  "cluster_name": "cluster",
  "status": "yellow",
  "timed_out": false,
  "number_of_nodes": 12,
  "number_of_data_nodes": 8,
  "active_primary_shards": 440,
  "active_shards": 863,
  "relocating_shards": 0,
  "initializing_shards": 0,
  "unassigned_shards": 7,
  "delayed_unassigned_shards": 0,
  "number_of_pending_tasks": 0,
  "number_of_in_flight_fetch": 0,
  "task_max_waiting_in_queue_millis": 0,
  "active_shards_percent_as_number":

```

GET /test-index-replica/\_settings

```auto
{
  "test-index-replica": {
    "settings": {
      "index": {
        "routing": {
          "allocation": {
            "include": {
              "_tier_preference": "data_content"
            }
          }
        },
        "number_of_shards": "1",
        "provided_name": "test-index-replica",
        "creation_date": "",
        "number_of_replicas": "1",
        "uuid": "",
        "version": {
          "created": ""
        }
      }
    }
  }
}

```

The output of `GET /_cluster/allocation/explain` has already been provided above.  
The setting `"cluster.routing.allocation.enable"` is set to `"all"`.

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [June 26, 2025, 6:24am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/10 "2025-06-26T06:24:12Z")

</div>

Hello @onel

Thank you for sharing the details.

As per the details shared I had observed similar situation where after rollover the shards were not allocated & issue was found as there was change in below parameter which has default value as "2.0E-11" , once it was reverted back to default value new shards were allocated without any issue.

`"cluster.routing.allocation.balance.disk_usage": "2.0E-11"`

Also can try to review the elasticsearch logs if it shows more information which can be helpful to proceed further on troubleshooting this issue.

Thanks!!

---

<div class="post-metadata">

**Author:** ![onel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onel/32/143827_2.png) [@onel](https://discuss.elastic.co/u/onel)\
**Post date:** [June 26, 2025, 8:14am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/11 "2025-06-26T08:14:20Z")

</div>

Thank you for your response.

It seems that the `"cluster.routing.allocation.balance.disk_usage"` option is currently set to a default value of `"2.0E-11"`. Could you please clarify what the actual default value of this setting is and what it means?

Also, are you saying that this setting—intended to balance disk usage evenly across nodes—is the reason why replica shards are not being allocated? I'm not quite sure I understand that part.

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [June 26, 2025, 8:22am UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/12 "2025-06-26T08:22:22Z")

</div>

Hello @onel

The one set is the actual default value.

> **[Cluster-level shard allocation and routing settings | Elasticsearch Guide...](https://www.elastic.co/guide/en/elasticsearch/reference/8.18/modules-cluster.html#shards-rebalancing-heuristics)**

As it is already default so your issue must be not related to this parameter.

More information related to this parameter  
Increasing the value of cluster.routing.allocation.balance.disk\_usage will make Elasticsearch more likely to equalize disk usage across nodes. This means that nodes with higher disk usage will be less likely to receive additional shards and shards may be moved to nodes with lower disk usage to achieve a more balanced distribution.

So sometime to balance the disk usage it takes time to allocate the shard.

Only thing is left is to review the elasticsearch logs & see if there are any messages related to this shard which can help to troubleshoot further.

Thanks!!

---

<div class="post-metadata">

**Author:** ![onel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/onel/32/143827_2.png) [@onel](https://discuss.elastic.co/u/onel)\
**Post date:** [July 4, 2025, 7:44pm UTC](https://discuss.elastic.co/t/replica-shards-of-newly-created-indices-remain-unassigned/379459/13 "2025-07-04T19:44:16Z")

</div>

**Hello, the issue was resolved after upgrading to version 8.18.3. Thank you!**
