# After I restart ES, some shard remain unassigned

**URL:** https://discuss.elastic.co/t/after-i-restart-es-some-shard-remain-unassigned/44402
**Category:** Elasticsearch
**Created:** [March 15, 2016, 8:40am UTC](https://discuss.elastic.co/t/after-i-restart-es-some-shard-remain-unassigned/44402 "2016-03-15T08:40:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Kramer\_Li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kramer_li/32/46872_2.png) [@Kramer\_Li](https://discuss.elastic.co/u/Kramer_Li)
#### Post date: [March 15, 2016, 8:40am UTC](https://discuss.elastic.co/t/after-i-restart-es-some-shard-remain-unassigned/44402/1 "2016-03-15T08:40:13Z")

</div>

Hi

I have a elasticsearch service running on one node. After I restart the ES. Some shard remain unassigned.

```
[sflow@ES01 bin]$ curl -XGET 'ES01:9200/_cat/shards?pretty'
sflow_51452355200 3 p STARTED 1000660 414.3mb 10.79.148.184 ES01 
sflow_51452355200 4 p STARTED 1000123 414.2mb 10.79.148.184 ES01 
sflow_51452355200 1 p STARTED 1000430 414.3mb 10.79.148.184 ES01 
sflow_51452355200 2 p INITIALIZING 10.79.148.184 ES01 
sflow_51452355200 0 p STARTED 997800 413.3mb 10.79.148.184 ES01 

```

Below are the logs. I removed some line to make it short

```
started
[sflow_51452355200][4] loaded data path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/4], state path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/4]
[sflow_51452355200][2] loaded data path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/2], state path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/2]
[sflow_51452355200][1] loaded data path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/1], state path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/1]
[sflow_51452355200][3] loaded data path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/3], state path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/3]
[sflow_51452355200][0] loaded data path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/0], state path [/opt/data/es_data_2_2/sflow/nodes/0/indices/sflow_51452355200/0]
[sflow_51452355200][4] shard state info found: [version [6], primary [true]]
[sflow_51452355200][2] shard state info found: [version [2], primary [true]]
[sflow_51452355200][1] shard state info found: [version [6], primary [true]]
[sflow_51452355200][3] shard state info found: [version [6], primary [true]]
[sflow_51452355200][0] shard state info found: [version [6], primary [true]]
recovered [1] indices into cluster_state
[sflow_51452355200][2] found 1 allocations of [sflow_51452355200][2], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]], highest version: [2]
[sflow_51452355200][2]: allocating [[sflow_51452355200][2], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]]] to [{ES01}{LE2YVQWZQG-adfV3akShKA}{10.79.148.184}{10.79.148.184:9300}] on primary allocation
[sflow_51452355200][3] found 1 allocations of [sflow_51452355200][3], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]], highest version: [6]
[sflow_51452355200][3]: allocating [[sflow_51452355200][3], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]]] to [{ES01}{LE2YVQWZQG-adfV3akShKA}{10.79.148.184}{10.79.148.184:9300}] on primary allocation
[sflow_51452355200][0] found 1 allocations of [sflow_51452355200][0], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]], highest version: [6]
[sflow_51452355200][0]: allocating [[sflow_51452355200][0], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]]] to [{ES01}{LE2YVQWZQG-adfV3akShKA}{10.79.148.184}{10.79.148.184:9300}] on primary allocation
[sflow_51452355200][1] found 1 allocations of [sflow_51452355200][1], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]], highest version: [6]
[sflow_51452355200][1]: allocating [[sflow_51452355200][1], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]]] to [{ES01}{LE2YVQWZQG-adfV3akShKA}{10.79.148.184}{10.79.148.184:9300}] on primary allocation
[sflow_51452355200][4] found 1 allocations of [sflow_51452355200][4], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]], highest version: [6]
[sflow_51452355200][4]: throttling allocation [[sflow_51452355200][4], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]]] to [[{ES01}{LE2YVQWZQG-adfV3akShKA}{10.79.148.184}{10.79.148.184:9300}]] on primary allocation
[sflow_51452355200][4] found 1 allocations of [sflow_51452355200][4], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]], highest version: [6]
[sflow_51452355200][4]: allocating [[sflow_51452355200][4], node[null], [P], v[0], s[UNASSIGNED], unassigned_info[[reason=CLUSTER_RECOVERED], at[2016-03-15T09:36:19.018Z]]] to [{ES01}{LE2YVQWZQG-adfV3akShKA}{10.79.148.184}{10.79.148.184:9300}] on primary allocation
```

---

<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: [March 16, 2016, 8:47pm UTC](https://discuss.elastic.co/t/after-i-restart-es-some-shard-remain-unassigned/44402/2 "2016-03-16T20:47:32Z")

</div>

What does `_cat/recovery` show?

---

<div class="post-metadata">

### Author: ![Kramer\_Li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kramer_li/32/46872_2.png) [@Kramer\_Li](https://discuss.elastic.co/u/Kramer_Li)
#### Post date: [March 17, 2016, 8:52am UTC](https://discuss.elastic.co/t/after-i-restart-es-some-shard-remain-unassigned/44402/3 "2016-03-17T08:52:21Z")

</div>

Hi Warkolm

I think it is no longer a problem now.  
The situation only happen when I import a lot of data into elasticsearch.

After index a lot data into es, the es shards will remain in a state (we can call it state unmerged I think) for a while.

During that time if I kill the es and restart the es, the shards will need some time to recovery.

So it will back to ok after a few min

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [March 18, 2016, 3:19pm UTC](https://discuss.elastic.co/t/after-i-restart-es-some-shard-remain-unassigned/44402/4 "2016-03-18T15:19:42Z")

</div>

Transaction log replay, probably.

---

<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: [July 5, 2017, 11:07pm UTC](https://discuss.elastic.co/t/after-i-restart-es-some-shard-remain-unassigned/44402/5 "2017-07-05T23:07:11Z")

</div>


