Note that there are some explanatory texts on larger screens.

plurals
  1. POElasticSearch: Unassigned Shards, how to fix?
    text
    copied!<p>I have an ES cluster with 4 nodes:</p> <pre><code>number_of_replicas: 1 search01 - master: false, data: false search02 - master: true, data: true search03 - master: false, data: true search04 - master: false, data: true </code></pre> <p>I had to restart search03, and when it came back, it rejoined the cluster no problem, but left 7 unassigned shards laying about. </p> <pre><code>{ "cluster_name" : "tweedle", "status" : "yellow", "timed_out" : false, "number_of_nodes" : 4, "number_of_data_nodes" : 3, "active_primary_shards" : 15, "active_shards" : 23, "relocating_shards" : 0, "initializing_shards" : 0, "unassigned_shards" : 7 } </code></pre> <p>Now my cluster is in yellow state. What is the best way to resolve this issue?</p> <ul> <li>Delete (cancel) the shards?</li> <li>Move the shards to another node?</li> <li>Allocate the shards to the node?</li> <li>Update 'number_of_replicas' to 2?</li> <li>Something else entirely?</li> </ul> <p>Interestingly, when a new index was added, that node started working on it and played nice with the rest of the cluster, it just left the unassigned shards laying about.</p> <p>Follow on question: am I doing something wrong to cause this to happen in the first place? I don't have much confidence in a cluster that behaves this way when a node is restarted. </p> <p><strong>NOTE:</strong> If you're running a single node cluster for some reason, you might simply need to do the following:</p> <pre><code>curl -XPUT 'localhost:9200/_settings' -d ' { "index" : { "number_of_replicas" : 0 } }' </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload