# All shards are unassigned, no index name in \_cat/shards

**URL:** https://discuss.elastic.co/t/all-shards-are-unassigned-no-index-name-in--cat-shards/71455
**Category:** Elasticsearch
**Created:** [January 13, 2017, 1:34am UTC](https://discuss.elastic.co/t/all-shards-are-unassigned-no-index-name-in--cat-shards/71455 "2017-01-13T01:34:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![George\_Luka](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@George\_Luka](https://discuss.elastic.co/u/George_Luka)
#### Post date: [January 13, 2017, 1:34am UTC](https://discuss.elastic.co/t/all-shards-are-unassigned-no-index-name-in--cat-shards/71455/1 "2017-01-13T01:34:03Z")

</div>

Hi All,

After running the \_cat/shards command I get the below,  
warning 3 p STARTED 0 160b 10.0.0.4 Karl Mordo  
warning 3 r UNASSIGNED  
warning 2 p STARTED 0 160b 10.0.0.4 Karl Mordo  
warning 2 r UNASSIGNED  
warning 4 p STARTED 0 160b 10.0.0.4 Karl Mordo  
warning 4 r UNASSIGNED  
warning 1 p STARTED 0 160b 10.0.0.4 Karl Mordo  
warning 1 r UNASSIGNED  
warning 0 p STARTED 0 160b 10.0.0.4 Karl Mordo  
warning 0 r UNASSIGNED

It did not mention index name , and mentioned "Warning"  
I was trying to use the below script to reassign the shards, however it would not work as the index name does not exist as mentioned above

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" : "t37",  
"shard" : $shard,  
"node" : "datanode15",  
"allow\_primary" : true  
}  
}  
]  
}'  
sleep 5  
done

also note when I open the \elasticsearch-2.3.4\data\elasticsearch\nodes\0\indices  
I found no indexes, only a "warning" folder, however the rest from 1 to 5 all have data for the indexes

Thanks in advance

---

<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: [January 13, 2017, 2:27am UTC](https://discuss.elastic.co/t/all-shards-are-unassigned-no-index-name-in--cat-shards/71455/2 "2017-01-13T02:27:01Z")

</div>

Is this cluster internet facing?

---

<div class="post-metadata">

### Author: ![George\_Luka](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@George\_Luka](https://discuss.elastic.co/u/George_Luka)
#### Post date: [January 13, 2017, 2:32am UTC](https://discuss.elastic.co/t/all-shards-are-unassigned-no-index-name-in--cat-shards/71455/3 "2017-01-13T02:32:18Z")

</div>

yes it is , it is currently single node, 5 shards

---

<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: [January 13, 2017, 2:32am UTC](https://discuss.elastic.co/t/all-shards-are-unassigned-no-index-name-in--cat-shards/71455/4 "2017-01-13T02:32:50Z")

</div>

Then you have been hit by [Ransom attack on Elasticsearch cluster?](https://discuss.elastic.co/t/ransom-attack-on-elasticsearch-cluster/71310)

---

<div class="post-metadata">

### Author: ![George\_Luka](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@George\_Luka](https://discuss.elastic.co/u/George_Luka)
#### Post date: [January 13, 2017, 3:19am UTC](https://discuss.elastic.co/t/all-shards-are-unassigned-no-index-name-in--cat-shards/71455/5 "2017-01-13T03:19:43Z")

</div>

Thanks very much for pointing me to this , unfortunately that is exactly what happened , as per the link above sadly I will have to create a new secured cluster  
Thanks again for your prompt response.  
George

---

<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: [February 10, 2017, 3:19am UTC](https://discuss.elastic.co/t/all-shards-are-unassigned-no-index-name-in--cat-shards/71455/6 "2017-02-10T03:19:59Z")

</div>

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