Good day,
for some reason my shards are showing up in my cluster as UNASSIGNED NODE_LEFT. i wrote a script based on recommendation on the web. however it doe not relocate the shards... please help
[root@essep02 tmp]# curl -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 39431 100 39431 0 0 291k 0 --:--:-- --:--:-- --:--:-- 291k
winlogbeat-2016.08.26 0 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.21 1 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.21 4 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.03 3 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.03 1 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.03 4 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.03 2 p UNASSIGNED NODE_LEFT
winlogbeat-2016.10.03 3 p UNASSIGNED NODE_LEFT
winlogbeat-2016.10.03 1 p UNASSIGNED NODE_LEFT
winlogbeat-2016.10.03 2 p UNASSIGNED NODE_LEFT
winlogbeat-2016.07.15 3 p UNASSIGNED NODE_LEFT
winlogbeat-2016.08.15 1 p UNASSIGNED NODE_LEFT
winlogbeat-2016.08.15 0 p UNASSIGNED NODE_LEFT
winlogbeat-2016.09.07 4 p UNASSIGNED NODE_LEFT
winlogbeat-2016.09.07 2 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.06 1 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.06 4 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.06 2 p UNASSIGNED NODE_LEFT
winlogbeat-2016.06.06 0 p UNASSIGNED NODE_LEFT
winlogbeat-2016.08.06 0 p UNASSIGNED NODE_LEFT
winlogbeat-2016.05.28 0 p UNASSIGNED NODE_LEFT
winlogbeat-2016.10.25 3 p UNASSIGNED NODE_LEFT
winlogbeat-2016.10.25 4 p UNASSIGNED NODE_LEFT
winlogbeat-2016.10.25 2 p UNASSIGNED NODE_LEFT
winlogbeat-2016.07.31 3 p UNASSIGNED NODE_LEFT
winlogbeat-2016.07.31 1 p UNASSIGNED NODE_LEFT
[root@essep03 ~]# for shard in $(curl -XGET http://localhost:9200/_cat/shards | grep UNASSIGNED | awk '{print $2}'); do
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{ "commands" : [ { "allocate" : { "index" : "winlogbeat-*", "shard" : $shard, "node" : "essep035", "allow_primary" : true } } ] }' sleep 5
done
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 71804 100 71804 0 0 186k 0 --:--:-- --:--:-- --:--:-- 186k
{"error":{"root_cause":[{"type":"parsing_exception","reason":"no [allocation_command] registered for [allocate]","line":3,"col":28}],"type":"parsing_exception","reason":"[cluster_reroute] failed to parse field [commands]","line":3,"col":28,"caused_by":{"type":"parsing_exception","reason":"no [allocation_command] registered for [allocate]","line":3,"col":28}},"status":400}{"error":{"root_cause":[{"type":"parsing_exception","reason":"no [allocation_command] registered for [allocate]","line":3,"col":28}],"type":"parsing_exception","reason":"[cluster_reroute] failed to parse field [commands]","line":3,"col":28,"caused_by":{"type":"parsing_exception","reason":"no [allocation_command] registered for [allocate]","line":3,"col":28}},"status":400}{"error":{"root_cause":[{"type":"parsing_exception","reason":"no [allocation_command] registered for [allocate]","line":3,"col":28}],"type":"parsing_exception","reason":"[cluster_reroute] failed to parse field [commands]","line":3,"col":28,"caused_by":{"type":"parsing_exception","reason":"no [allocation_command] registered for [allocate]","line":3,"col":28}},"status":400}^C