ES 6.5 unassigned_shards":1000 do not get assigned - status yellow


for unknown reasons after the last restart, elasticsearch has unassigned shards that do not get assigned and cluster status stays yellow. It's a single node host with no further adjustments.

root@kibana03:/# curl -XGET 'http://localhost:9200/_cluster/health'

Index size is currently:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc1       2,0T  750G  1,3T  38% /index

  "name" : "eRP8UvH",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "dJCYdbekQFGm5R0VMjD_cg",
  "version" : {
    "number" : "6.5.4",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "d2ef93d",
    "build_date" : "2018-12-17T21:17:40.758843Z",
    "build_snapshot" : false,
    "lucene_version" : "7.5.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  "tagline" : "You Know, for Search"

What to do?

Thank you.


As you only have 1 node it may be that you have replica shards configured. Elasticsearch will never allocate a primary and its replica on the same node.

How can we check this?

As the status is yellow and not red that is generally the case.

Thank you. I was able to bring the status back to green with:

curl -H 'Content-Type: application/json' -XPUT -d '
    "index" : {
        "number_of_replicas" : 0

Thats it or do i have to set it generally for all new indicies? If so, how can i do this?

Thank you very much for your time!

To answer my own questions. Seems to be:

curl -H 'Content-Type: application/json' -XPUT
  "template": "*",
  "settings": {
    "number_of_replicas": 0

Be aware there is a property named auto-expand-replicas which will create replica shards automatically on new indices if set to 0-1. For more information you can have a look here.

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