I have an elasticsearch cluster that will not leave a red state no matter what I try.
"cluster_name" : "es-logstash",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 13,
"number_of_data_nodes" : 2,
"active_primary_shards" : 3739,
"active_shards" : 7189,
"relocating_shards" : 0,
"initializing_shards" : 6,
"unassigned_shards" : 283,
"number_of_pending_tasks" : 102
curl -XPUT 'localhost:9200/_cluster/settings' -d '{ "transient" : { "cluster.routing.allocation.enable" : "all" } }'
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
"commands": [{
"allocate": {
"index": "logstash-syslog-events-2015.06.26",
"shard": 3,
"node": "es-logstash-n1",
"allow_primary": 1
}
}]
}'
I have somehow ended up with index shards with strange nodes:
{"state":"STARTED","primary":true,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":0,"index":"logstash-windows-events2015.04.23"}
{"state":"STARTED","primary":false,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":3,"index":"logstash-windows-events2015.04.23"}
{"state":"STARTED","primary":false,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":1,"index":"logstash-windows-events2015.04.23"}
{"state":"STARTED","primary":false,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":2,"index":"logstash-windows-events2015.04.23"}
{"state":"STARTED","primary":true,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":0,"index":".marvel-2015.03.09"}
{"state":"STARTED","primary":true,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":4,"index":"logstash-windows-events2015.04.20"}
{"state":"STARTED","primary":true,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":0,"index":"logstash-windows-events2015.04.20"}
{"state":"STARTED","primary":false,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":3,"index":"logstash-windows-events2015.04.20"}
{"state":"STARTED","primary":false,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":1,"index":"logstash-windows-events2015.04.20"}
{"state":"STARTED","primary":false,"node":"0WjU5UtwSrS0bqnJR6Vqaw","relocating_node":null,"shard":2,"index":"logstash-windows-events2015.04.20"}
Is it possible to take everything that is unassigned and 'flush' it's status so it reallocates between the two nodes in my cluster?