# Elastic Search Cluster has unassigned Shards

**URL:** https://discuss.elastic.co/t/elastic-search-cluster-has-unassigned-shards/83828
**Category:** Elasticsearch
**Created:** [April 27, 2017, 9:20am UTC](https://discuss.elastic.co/t/elastic-search-cluster-has-unassigned-shards/83828 "2017-04-27T09:20:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![farazkhan](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@farazkhan](https://discuss.elastic.co/u/farazkhan)
#### Post date: [April 27, 2017, 9:20am UTC](https://discuss.elastic.co/t/elastic-search-cluster-has-unassigned-shards/83828/1 "2017-04-27T09:20:14Z")

</div>

I ran health check for my cluster. Its showing RED. I see there are plenty of unassigned shards. I tried restarting the but it still wont remove the unassigned shards. I am using ES version 2.4

{  
"cluster\_name":"test-clu",  
"status":"red",  
"timed\_out":false,  
"number\_of\_nodes":5,  
"number\_of\_data\_nodes":2,  
"active\_primary\_shards":355,  
"active\_shards":610,  
"relocating\_shards":0,  
"initializing\_shards":2,  
"unassigned\_shards":110,  
"delayed\_unassigned\_shards":0,  
"number\_of\_pending\_tasks":2,  
"number\_of\_in\_flight\_fetch":0,  
"task\_max\_waiting\_in\_queue\_millis":20,  
"active\_shards\_percent\_as\_number":84.48753462603878  
}

Please suggest how can I get my cluster status back to "Green"

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 27, 2017, 9:40am UTC](https://discuss.elastic.co/t/elastic-search-cluster-has-unassigned-shards/83828/2 "2017-04-27T09:40:06Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

It can take sometime before everything gets recovered.  
Check the pending tasks.

Probably you have to wait.

That said, out of curiosity, why do you have 5 nodes but only 2 data nodes?

---

<div class="post-metadata">

### Author: ![farazkhan](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@farazkhan](https://discuss.elastic.co/u/farazkhan)
#### Post date: [April 27, 2017, 9:57am UTC](https://discuss.elastic.co/t/elastic-search-cluster-has-unassigned-shards/83828/3 "2017-04-27T09:57:41Z")

</div>

I am not sure why they have used 5 nodes and 2 data nodes. Started working in this recently. I have the below pending tasks.

{  
"tasks":[  
{  
"insert\_order":1395911,  
"priority":"HIGH",  
"source":"shard-failed ([nedi-170313][3], node[hkXE-ZVWQju-8SCwaZGEWw], [R], v[155530], s[INITIALIZING], a[id=bD2SUxXXSkuUScOmDVrkuw], unassigned\_info[[reason=ALLOCATION\_FAILED], at[2017-04-27T09:50:38.152Z], details[failed to create shard, failure ElasticsearchException[failed to create shard]; nested: NotSerializableExceptionWrapper[file\_system\_exception: /data/nedi-esdata-02/nedi-clu/nodes/0/indices/nedi-170313/3/index: Too many open files]; ]]), message [failed recovery]",  
"executing":true,  
"time\_in\_queue\_millis":57,  
"time\_in\_queue":"57ms"  
},  
{  
"insert\_order":1395912,  
"priority":"HIGH",  
"source":"cluster\_reroute(async\_shard\_fetch)",  
"executing":false,  
"time\_in\_queue\_millis":52,  
"time\_in\_queue":"52ms"  
},  
{  
"insert\_order":1395913,  
"priority":"HIGH",  
"source":"shard-failed ([nedi-170309][0], node[hkXE-ZVWQju-8SCwaZGEWw], [R], v[147220], s[INITIALIZING], a[id=aTzdJcJXQrK5M3UR\_-Svug], unassigned\_info[[reason=ALLOCATION\_FAILED], at[2017-04-27T09:50:38.198Z], details[failed to create shard, failure ElasticsearchException[failed to create shard]; nested: NotSerializableExceptionWrapper[file\_system\_exception: /data/nedi-esdata-02/nedi-clu/nodes/0/indices/nedi-170309/0/index: Too many open files]; ]]), message [failed to create shard]",  
"executing":false,  
"time\_in\_queue\_millis":15,  
"time\_in\_queue":"15ms"  
}  
]  
}

Please suggest how can I proceed as I am new to ElasticSearch

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 27, 2017, 11:14am UTC](https://discuss.elastic.co/t/elastic-search-cluster-has-unassigned-shards/83828/4 "2017-04-27T11:14:22Z")

</div>

You seem to be running low on ressources.

Either start new nodes, increase open files descriptors or remove non needed indices.

May be you have too much shards per index.

---

<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: [May 25, 2017, 11:16am UTC](https://discuss.elastic.co/t/elastic-search-cluster-has-unassigned-shards/83828/5 "2017-05-25T11:16:34Z")

</div>

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