0
votes

I have a two nodes elasticsearch cluster with logstash and kibana. The cluster was on green status until I have started the logstash the elasticsearch cluster went to yellow status. running curl -XGET http://localhost:9200/_cat/shards?pretty will show the following

.kibana             0 p STARTED     2   8.2kb 172.17.0.1 Ereshkigal          
.kibana             0 r UNASSIGNED                                           
logstash-2015.10.18 4 r STARTED    69 101.9kb 172.17.0.1 Ereshkigal          
logstash-2015.10.18 4 p STARTED    69 101.7kb 172.17.0.2 Hargen the Measurer 
logstash-2015.10.18 0 r STARTED    62  65.7kb 172.17.0.1 Ereshkigal          
logstash-2015.10.18 0 p STARTED    62  89.4kb 172.17.0.2 Hargen the Measurer 
logstash-2015.10.18 3 p STARTED    76  48.1kb 172.17.0.1 Ereshkigal          
logstash-2015.10.18 3 r UNASSIGNED                                           
logstash-2015.10.18 1 p STARTED    74  78.8kb 172.17.0.1 Ereshkigal          
logstash-2015.10.18 1 r UNASSIGNED                                           
logstash-2015.10.18 2 r STARTED    79  56.8kb 172.17.0.1 Ereshkigal          
logstash-2015.10.18 2 p STARTED    79  65.1kb 172.17.0.2 Hargen the Measurer 
logstash-2015.10.19 4 p STARTED     7  43.4kb 172.17.0.1 Ereshkigal          
logstash-2015.10.19 4 r UNASSIGNED                                           
logstash-2015.10.19 0 r STARTED     7  50.8kb 172.17.0.1 Ereshkigal          
logstash-2015.10.19 0 p STARTED     7  58.3kb 172.17.0.2 Hargen the Measurer 
logstash-2015.10.19 3 r STARTED     9  67.4kb 172.17.0.1 Ereshkigal          
logstash-2015.10.19 3 p STARTED     9  67.3kb 172.17.0.2 Hargen the Measurer 
logstash-2015.10.19 1 r STARTED    12  76.4kb 172.17.0.1 Ereshkigal          
logstash-2015.10.19 1 p STARTED    12  13.8kb 172.17.0.2 Hargen the Measurer 
logstash-2015.10.19 2 p STARTED    13    78kb 172.17.0.1 Ereshkigal          
logstash-2015.10.19 2 r UNASSIGNED

How can I get the cluster back in green status?

1
Can you check the free disk on both the nodesVineeth Mohan
Both nodes are at 48% disk usage. There is more then enough space on both nodes.zozo6015

1 Answers

0
votes

Yellow means you have unassigned shards, as shown by your output.

Make sure your shard allocation is enabled:

curl -XPUT localhost:9200/_cluster/settings -d '{
    "transient" : {
        "cluster.routing.allocation.enable" : "all"
    }
}'

You can also try forcing the shard onto a node:

https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html