# Why shard unassigned after cluster restart completely?

**URL:** https://discuss.elastic.co/t/why-shard-unassigned-after-cluster-restart-completely/230460
**Category:** Elasticsearch
**Created:** [April 30, 2020, 3:30am UTC](https://discuss.elastic.co/t/why-shard-unassigned-after-cluster-restart-completely/230460 "2020-04-30T03:30:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wfeng888](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@wfeng888](https://discuss.elastic.co/u/wfeng888)
#### Post date: [April 30, 2020, 3:30am UTC](https://discuss.elastic.co/t/why-shard-unassigned-after-cluster-restart-completely/230460/1 "2020-04-30T03:30:57Z")

</div>

I have a cluster with 3 nodes, all have node.master: true and node.data: true. Almost every index loss one or two shards either primary or replica after i restart three nodes 1 by one. All indices have settings of 5 primary and 1 replica. There had no errors in log files. In the end, i reroute these shard by allocate\_empty\_primary . I'm looking for the reason for this by read a lot of articles , but none of them matched my situation.

es version 5.4.3.  
The explain API shows:  
{  
"index": "dcvs\_nonmotorvehicle",  
"shard": 3,  
"primary": true,  
"current\_state": "unassigned",  
"unassigned\_info": {  
"reason": "CLUSTER\_RECOVERED",  
"at": "2020-04-10T03:40:41.127Z",  
"last\_allocation\_status": "no\_valid\_shard\_copy"  
},  
"can\_allocate": "no\_valid\_shard\_copy",  
"allocate\_explanation": "cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster",  
"node\_allocation\_decisions": [  
{  
"node\_id": "TklXzLKySf-czdu8zZ5hyQ",  
"node\_name": "host2",  
"transport\_address": "host2:9300",  
"node\_attributes": {  
"cname": "202",  
"rack\_id": "rack\_two"  
},  
"node\_decision": "no",  
"store": {  
"found": false  
}  
},  
{  
"node\_id": "WDaA85bmQhKZxvgq4ve0Kw",  
"node\_name": "host3",  
"transport\_address": "host3:9300",  
"node\_attributes": {  
"cname": "210",  
"rack\_id": "rack\_three"  
},  
"node\_decision": "no",  
"store": {  
"found": false  
}  
},  
{  
"node\_id": "dAXXDGDyQaGcex6VcZP0eg",  
"node\_name": "host1",  
"transport\_address": "host1:9300",  
"node\_attributes": {  
"cname": "201",  
"rack\_id": "rack\_one"  
},  
"node\_decision": "no",  
"store": {  
"found": false  
}  
}  
]  
}

---

<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: [May 28, 2020, 3:42am UTC](https://discuss.elastic.co/t/why-shard-unassigned-after-cluster-restart-completely/230460/2 "2020-05-28T03:42:26Z")

</div>

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