# Shards UNASSIGNED NODE\_LEFT

**URL:** https://discuss.elastic.co/t/shards-unassigned-node-left/65392
**Category:** Elasticsearch
**Created:** [November 8, 2016, 7:21pm UTC](https://discuss.elastic.co/t/shards-unassigned-node-left/65392 "2016-11-08T19:21:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![alvaroca1](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@alvaroca1](https://discuss.elastic.co/u/alvaroca1)
#### Post date: [November 8, 2016, 7:21pm UTC](https://discuss.elastic.co/t/shards-unassigned-node-left/65392/1 "2016-11-08T19:21:26Z")

</div>

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](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

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 9, 2016, 6:54am UTC](https://discuss.elastic.co/t/shards-unassigned-node-left/65392/2 "2016-11-09T06:54:40Z")

</div>

Did a node leave?

> [@alvaroca1](#):
>
> based on recommendation on the web

That is probably not the best.

---

<div class="post-metadata">

### Author: ![alvaroca1](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@alvaroca1](https://discuss.elastic.co/u/alvaroca1)
#### Post date: [November 9, 2016, 3:30pm UTC](https://discuss.elastic.co/t/shards-unassigned-node-left/65392/3 "2016-11-09T15:30:55Z")

</div>

so what do I do to fix it, I have 273 in assigned shards

---

<div class="post-metadata">

### Author: ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)
#### Post date: [November 9, 2016, 3:35pm UTC](https://discuss.elastic.co/t/shards-unassigned-node-left/65392/4 "2016-11-09T15:35:07Z")

</div>

The node that had the shards that are unassigned now has crashed / was shut down and there is no other node with that data (as you didn't configure replicas). If you don't care about the data, feel free to delete the indices.

---

<div class="post-metadata">

### Author: ![alvaroca1](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@alvaroca1](https://discuss.elastic.co/u/alvaroca1)
#### Post date: [November 9, 2016, 3:37pm UTC](https://discuss.elastic.co/t/shards-unassigned-node-left/65392/5 "2016-11-09T15:37:00Z")

</div>

anything I can do to get it back?

---

<div class="post-metadata">

### Author: ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)
#### Post date: [November 9, 2016, 4:49pm UTC](https://discuss.elastic.co/t/shards-unassigned-node-left/65392/6 "2016-11-09T16:49:54Z")

</div>

start up the node that had the data that's now missing?

---

<div class="post-metadata">

### Author: ![Ben\_Davis](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@Ben\_Davis](https://discuss.elastic.co/u/Ben_Davis)
#### Post date: [November 13, 2016, 7:56pm UTC](https://discuss.elastic.co/t/shards-unassigned-node-left/65392/7 "2016-11-13T19:56:09Z")

</div>

> no [allocation\_command] registered for [allocate]

It looks to me in 5.0 the cluster reroute command changed and no longer accepts the "allocate" parameter. That would explain this error.

From the documentation for cluster/reroute in previous versions of ES:

> 'allocate'  
> Allocate an unassigned shard to a node. Accepts the index and shard for index name and shard number, and node to allocate the shard to. It also accepts allow\_primary flag to explicitly specify that it is allowed to explicitly allocate a primary shard (might result in data loss).

Do you see something else that indicates the data is missing altogether?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 11, 2016, 7:56pm UTC](https://discuss.elastic.co/t/shards-unassigned-node-left/65392/8 "2016-12-11T19:56:38Z")

</div>

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