# Closed indexes

**URL:** <https://discuss.elastic.co/t/closed-indexes/137367>\
**Category:** Elasticsearch\
**Created:** [June 26, 2018, 6:07am UTC](https://discuss.elastic.co/t/closed-indexes/137367 "2018-06-26T06:07:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![roshni](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@roshni](https://discuss.elastic.co/u/roshni)\
**Post date:** [June 26, 2018, 6:07am UTC](https://discuss.elastic.co/t/closed-indexes/137367/1 "2018-06-26T06:07:33Z")

</div>

Hi I had closed an index using the following -  
` curl -X POST "node1:9200/filebeat-index123/_close"`  
When reopened the same

`curl -X POST "node1:9200/filebeat-index123/_open"`

The status changed to yellow which was initially green before closing it .  
`yellow open filebeat-index dyXHg-ZKSZ-0KTFRmqhssQ 5 1 96282 0 23mb 12.7mb`

What could be the possible cause of this status change

Logs ::

> ```
> [2018-06-26T11:33:12,798][DEBUG][o.e.c.s.ClusterService] [node1] applying cluster state version 55
> [2018-06-26T11:33:12,798][DEBUG][o.e.c.s.ClusterService] [node1] set local cluster state to version 55
> [2018-06-26T11:33:12,799][DEBUG][o.e.c.s.ClusterService] [node1] processing [cluster_reroute(async_shard_fetch)]: took [43ms] done applying updated cluster_state (version: 55, uuid: EfKsxhG9TH2OTKTynjw0Hw)
> [2018-06-26T11:33:12,921][DEBUG][o.e.c.a.s.ShardStateAction] [node1] [filebeat-2018.06.25][2] received shard started for [shard id [[filebeat-2018.06.25][2]], allocation id [SEH8FPTgT-6oDIT0nq2dYw], primary term [0], message [after peer recovery]]
> [2018-06-26T11:33:12,922][DEBUG][o.e.c.s.ClusterService] [node1] processing [shard-started[shard id [[filebeat-2018.06.25][2]], allocation id [SEH8FPTgT-6oDIT0nq2dYw], primary term [0], message [after peer recovery]]]: execute
> [2018-06-26T11:33:12,922][DEBUG][o.e.c.a.s.ShardStateAction] [node1] [filebeat-2018.06.25][2] starting shard [filebeat-2018.06.25][2], node[EYR6YfKPQ-GZG0kXwRlnDQ], [R], recovery_source[peer recovery], s[INITIALIZING], a[id=SEH8FPTgT-6oDIT0nq2dYw], unassigned_info[[reason=INDEX_REOPENED], at[2018-06-26T06:03:10.920Z], delayed=false, allocation_status[no_attempt]] (shard started task: [shard id [[filebeat-2018.06.25][2]], allocation id [SEH8FPTgT-6oDIT0nq2dYw], primary term [0], message [after peer recovery]])
> [2018-06-26T11:33:12,922][DEBUG][o.e.c.s.ClusterService] [node1] cluster state updated, version [56], source [shard-started[shard id [[filebeat-2018.06.25][2]], allocation id [SEH8FPTgT-6oDIT0nq2dYw], primary term [0], message [after peer recovery]]]
> [2018-06-26T11:33:12,922][DEBUG][o.e.c.s.ClusterService] [node1] publishing cluster state version [56]
> [2018-06-26T11:33:12,973][DEBUG][o.e.c.s.ClusterService] [node1] applying cluster state version 56
> [2018-06-26T11:33:12,973][DEBUG][o.e.c.s.ClusterService] [node1] set local cluster state to version 56
> [2018-06-26T11:33:13,013][DEBUG][o.e.c.s.ClusterService] [node1] processing [shard-started[shard id [[filebeat-2018.06.25][2]], allocation id [SEH8FPTgT-6oDIT0nq2dYw], primary term [0], message [after peer recovery]]]: took [91ms] done applying updated cluster_state (version: 56, uuid: wgsbxYc5S3uMoDBx9x6Sdg)
> [2018-06-26T11:33:13,212][DEBUG][o.e.c.a.s.ShardStateAction] [node1] [filebeat-2018.06.25][3] received shard started for [shard id [[filebeat-2018.06.25][3]], allocation id [y_FBMagCSeWzjAMHid2PnQ], primary term [0], message [after peer recovery]]
> [2018-06-26T11:33:13,212][DEBUG][o.e.c.s.ClusterService] [node1] processing [shard-started[shard id [[filebeat-2018.06.25][3]], allocation id [y_FBMagCSeWzjAMHid2PnQ], primary term [0], message [after peer recovery]]]: execute
> [2018-06-26T11:33:13,212][DEBUG][o.e.c.a.s.ShardStateAction] [node1] [filebeat-2018.06.25][3] starting shard [filebeat-2018.06.25][3], node[EYR6YfKPQ-GZG0kXwRlnDQ], [R], recovery_source[peer recovery], s[INITIALIZING], a[id=y_FBMagCSeWzjAMHid2PnQ], unassigned_info[[reason=INDEX_REOPENED], at[2018-06-26T06:03:10.920Z], delayed=false, allocation_status[no_attempt]] (shard started task: [shard id [[filebeat-2018.06.25][3]], allocation id [y_FBMagCSeWzjAMHid2PnQ], primary term [0], message [after peer recovery]])
> [2018-06-26T11:33:13,213][DEBUG][o.e.c.s.ClusterService] [node1] cluster state updated, version [57], source [shard-started[shard id [[filebeat-2018.06.25][3]], allocation id [y_FBMagCSeWzjAMHid2PnQ], primary term [0], message [after peer recovery]]]
> [2018-06-26T11:33:13,213][DEBUG][o.e.c.s.ClusterService] [node1] publishing cluster state version [57]
> [2018-06-26T11:33:13,248][DEBUG][o.e.c.s.ClusterService] [node1] applying cluster state version 57
> [2018-06-26T11:33:13,248][DEBUG][o.e.c.s.ClusterService] [node1] set local cluster state to version 57
> [2018-06-26T11:33:13,288][DEBUG][o.e.c.s.ClusterService] [node1] processing [shard-started[shard id [[filebeat-2018.06.25][3]], allocation id [y_FBMagCSeWzjAMHid2PnQ], primary term [0], message [after peer recovery]]]: took [76ms] done applying updated cluster_state (version: 57, uuid: 5Am02aUTREyIQRx_EhQR3Q)
> 
> ```

---

<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:** [June 26, 2018, 11:27pm UTC](https://discuss.elastic.co/t/closed-indexes/137367/2 "2018-06-26T23:27:59Z")

</div>

Once you close an index it removes all the replicas. Then upon open it needs to recreate and reallocate them.

If you wait, it should return to green.

---

<div class="post-metadata">

**Author:** ![roshni](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@roshni](https://discuss.elastic.co/u/roshni)\
**Post date:** [June 27, 2018, 12:41pm UTC](https://discuss.elastic.co/t/closed-indexes/137367/3 "2018-06-27T12:41:50Z")

</div>

Suppose initially i had set 3 replicas , after I close the index , you are saying these settings will be lost and it will recreate again with default number of replicas and shards which is (1 and 5 respectively ) and not with the previous settings (which were 3 replicas )

---

<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:** [June 27, 2018, 10:23pm UTC](https://discuss.elastic.co/t/closed-indexes/137367/4 "2018-06-27T22:23:06Z")

</div>

If you had 3 set then that is what it will reallocate.

---

<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 25, 2018, 10:23pm UTC](https://discuss.elastic.co/t/closed-indexes/137367/5 "2018-07-25T22:23:08Z")

</div>

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