# Yellow heath, Unassigned shards after restart

**URL:** https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775
**Category:** Elasticsearch
**Created:** [September 24, 2020, 8:48am UTC](https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775 "2020-09-24T08:48:03Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Graham\_Smart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/graham_smart/32/71449_2.png) [@Graham\_Smart](https://discuss.elastic.co/u/Graham_Smart)
#### Post date: [September 24, 2020, 8:48am UTC](https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775/1 "2020-09-24T08:48:03Z")

</div>

Hi Guys, Im sure this is a simple one, but i cant seem to resolve.

My ES node ran our of JVM space. So i modified its upper limit and restarted ES as ive done many times.  
This time round, it refuses to go Green. Its been yellow now for two days.

The ONLY thing i can find is two shards not being assigned. Logs are empty of anything relevant.

Any thoughts?  
Thanks in advance!

```
{
  "cluster_name" : "elasticsearch",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 611,
  "active_shards" : 611,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 4,
  "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" : 99.34959349593497
}

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/1/110b18898762729bb3615a1c6a503d160e290957.png)

---

<div class="post-metadata">

### Author: ![Graham\_Smart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/graham_smart/32/71449_2.png) [@Graham\_Smart](https://discuss.elastic.co/u/Graham_Smart)
#### Post date: [September 24, 2020, 8:59am UTC](https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775/2 "2020-09-24T08:59:31Z")

</div>

```
{

* "state": "UNASSIGNED",
* "primary": false,
* "node": null,
* "relocating_node": null,
* "shard": 0,
* "index": "metrics-index_pattern_placeholder",
* "recovery_source": {
  * "type": "PEER"},
* "unassigned_info": {
  * "reason": "CLUSTER_RECOVERED",
  * "at": "2020-09-22T08:19:35.187Z",
  * "delayed": false,
  * "allocation_status": "no_attempt"}

}
```

---

<div class="post-metadata">

### Author: ![Graham\_Smart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/graham_smart/32/71449_2.png) [@Graham\_Smart](https://discuss.elastic.co/u/Graham_Smart)
#### Post date: [September 24, 2020, 9:04am UTC](https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775/3 "2020-09-24T09:04:48Z")

</div>

More info

```
{

* "index": "logs-index_pattern_placeholder",
* "shard": 0,
* "primary": false,
* "current_state": "unassigned",
* "unassigned_info": {
  * "reason": "CLUSTER_RECOVERED",
  * "at": "2020-09-22T08:19:35.187Z",
  * "last_allocation_status": "no_attempt"},
* "can_allocate": "no",
* "allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes",
* "node_allocation_decisions": [
  * {
    * "node_id": "WMC9UvMnTlWXGZGIjHuJqA",
    * "node_name": "siem-es-01",
    * "transport_address": "127.0.0.1:9300",
    * "node_attributes": {
      * "ml.machine_memory": "8348577792",
      * "xpack.installed": "true",
      * "transform.node": "true",
      * "ml.max_open_jobs": "20"},
    * "node_decision": "no",
    * "deciders": [
      * {
        * "decider": "same_shard",
        * "decision": "NO",
        * "explanation": "a copy of this shard is already allocated to this node [[logs-index_pattern_placeholder][0], node[WMC9UvMnTlWXGZGIjHuJqA], [P], s[STARTED], a[id=0rZvrNBASBadFXKGJQOOdw]]"}]}]

}
```

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [September 24, 2020, 9:05am UTC](https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775/4 "2020-09-24T09:05:32Z")

</div>

Do the indices with unassigned shard by any chance have a replica shard configured?

---

<div class="post-metadata">

### Author: ![Graham\_Smart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/graham_smart/32/71449_2.png) [@Graham\_Smart](https://discuss.elastic.co/u/Graham_Smart)
#### Post date: [September 24, 2020, 9:08am UTC](https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775/5 "2020-09-24T09:08:46Z")

</div>

Still new to it.. where would i check that?

It does appear that one shard is allocated and fine, but there is another that isnt.. so that does sound and make sense..

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [September 24, 2020, 9:12am UTC](https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775/6 "2020-09-24T09:12:20Z")

</div>

Check the index settings. As you have only one node, replica shards will never get allocated as Elasticsearch never allocates them on the same node as the primary.

---

<div class="post-metadata">

### Author: ![Graham\_Smart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/graham_smart/32/71449_2.png) [@Graham\_Smart](https://discuss.elastic.co/u/Graham_Smart)
#### Post date: [September 24, 2020, 9:22am UTC](https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775/7 "2020-09-24T09:22:13Z")

</div>

Thanks,  
Seems to fix the issue updating the index setting to 0 replicas..

No idea why it randomly decided to add an index with 1 replica on a single node cluster.

Cheers again

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 22, 2020, 9:22am UTC](https://discuss.elastic.co/t/yellow-heath-unassigned-shards-after-restart/249775/8 "2020-10-22T09:22:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
