# How to recover my elasticsearch cluster status to \`green\`

**URL:** <https://discuss.elastic.co/t/how-to-recover-my-elasticsearch-cluster-status-to-green/126030>\
**Category:** Elasticsearch\
**Created:** [March 29, 2018, 6:16am UTC](https://discuss.elastic.co/t/how-to-recover-my-elasticsearch-cluster-status-to-green/126030 "2018-03-29T06:16:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anson\_ch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anson_ch/32/26647_2.png) [@anson\_ch](https://discuss.elastic.co/u/anson_ch)\
**Post date:** [March 29, 2018, 6:16am UTC](https://discuss.elastic.co/t/how-to-recover-my-elasticsearch-cluster-status-to-green/126030/1 "2018-03-29T06:16:35Z")

</div>

My elasticsearch cluster have 3 nodes and both are data and master node.there are some `unassigned_shards`are UNASSIGNED, how can i resolve this problem?  
elasticsearch version: 2.2.0

**root@elasticsearch-logging-v1-6rldl:/elasticsearch/config# curl localhost:9200/\_cluster/health?pretty**  
{  
"cluster\_name" : "kubernetes-logging",  
"status" : "red",  
"timed\_out" : false,  
"number\_of\_nodes" : 3,  
"number\_of\_data\_nodes" : 3,  
"active\_primary\_shards" : 13,  
"active\_shards" : 25,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 5,  
"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" : 83.33333333333334  
}  
**root@elasticsearch-logging-v1-6rldl:/elasticsearch/config# curl localhost:9200/\_cat/nodes**  
172.17.28.12 172.17.28.12 34 99 0.20 d m elasticsearch-logging-v1-4ln4d  
172.17.28.13 172.17.28.13 29 99 0.20 d m elasticsearch-logging-v1-6rldl  
172.17.18.16 172.17.18.16 25 99 1.13 d \* elasticsearch-logging-v1-hqvfn  
root@elasticsearch-logging-v1-6rldl:/elasticsearch/config# curl localhost:9200/\_cat/indices  
red open logstash-2018.03.26 5 1 4345964 0 1.6gb 826.1mb  
yellow open logstash-2018.03.27 5 1 56808073 0 25.1gb 13.9gb  
red open logstash-2018.03.28 5 1 23086497 0 11.6gb 5.7gb  
close logstash-2018.03.20  
close logstash-2018.03.22  
**root@elasticsearch-logging-v1-6rldl:/elasticsearch/config# curl localhost:9200/\_cat/allocation**  
11 16.3gb 33.9gb 5.3gb 39.2gb 86 172.17.28.12 172.17.28.12 elasticsearch-logging-v1-4ln4d  
2 2.9gb 33.9gb 5.3gb 39.2gb 86 172.17.28.13 172.17.28.13 elasticsearch-logging-v1-6rldl  
12 19gb 30.6gb 8.5gb 39.2gb 78 172.17.18.16 172.17.18.16 elasticsearch-logging-v1-hqvfn  
**5 UNASSIGNED**

**root@elasticsearch-logging-v1-6rldl:/elasticsearch/config# curl localhost:9200/\_cluster/health?level=indices**  
{"cluster\_name":"kubernetes-logging","status":"red","timed\_out":false,"number\_of\_nodes":3,"number\_of\_data\_nodes":3,"active\_primary\_shards":13,"active\_shards":25,"relocating\_shards":0,"initializing\_shards":0,"unassigned\_shards":5,"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":83.33333333333334,  
"indices":{"logstash-2018.03.26": **{"status":"red","number\_of\_shards":5,"number\_of\_replicas":1,"active\_primary\_shards":4,"active\_shards":8,"relocating\_shards":0,"initializing\_shards":0,"unassigned\_shards":2},**  
"logstash-2018.03.27":{"status":"yellow","number\_of\_shards":5,"number\_of\_replicas":1,"active\_primary\_shards":5,"active\_shards":9,"relocating\_shards":0,"initializing\_shards":0,"unassigned\_shards":1},  
"logstash-2018.03.28":{"status":"red","number\_of\_shards":5,"number\_of\_replicas":1,"active\_primary\_shards":4,"active\_shards":8,"relocating\_shards":0,"initializing\_shards":0,"unassigned\_shards":2}}}

---

<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:** [April 26, 2018, 6:16am UTC](https://discuss.elastic.co/t/how-to-recover-my-elasticsearch-cluster-status-to-green/126030/2 "2018-04-26T06:16:57Z")

</div>

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