# Cluster health becomes RED after create a new index

**URL:** <https://discuss.elastic.co/t/cluster-health-becomes-red-after-create-a-new-index/45332>\
**Category:** Elasticsearch\
**Created:** [March 24, 2016, 10:18am UTC](https://discuss.elastic.co/t/cluster-health-becomes-red-after-create-a-new-index/45332 "2016-03-24T10:18:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [March 24, 2016, 10:18am UTC](https://discuss.elastic.co/t/cluster-health-becomes-red-after-create-a-new-index/45332/1 "2016-03-24T10:18:14Z")

</div>

hi,  
I met a very strange issue. My cluster (ES 1.7.1) always enters red status if I create a new index with only one doc.

Repro steps:

1. get current health:  
[http://localhost:9200/\_cat/health](http://localhost:9200/_cat/health)

2. create a new index by posting a doc:

"error": "UnavailableShardsException[[testindex][2] Primary shard is not active or isn't assigned to a known node. Timeout: [1m], request: delete {[testindex][doc][1]}]"

Also, the cluster health becomes "red"

I checked the ES log file, only found following error message:  
[2016-03-24 10:04:40,866][DEBUG][action.index] [data-node-vm5] observer: timeout notification from cluster service. timeout setting [1m], time since start [1m]

How to troubleshoot the root cause?

---

<div class="post-metadata">

**Author:** ![iliasse](https://avatars.discourse-cdn.com/v4/letter/i/22d042/32.png) [@iliasse](https://discuss.elastic.co/u/iliasse)\
**Post date:** [March 24, 2016, 2:00pm UTC](https://discuss.elastic.co/t/cluster-health-becomes-red-after-create-a-new-index/45332/2 "2016-03-24T14:00:39Z")

</div>

Hi,

May be that you should assign "by hand" your shard.  
`GET _cat/shards`

And check if this setting is correctly setted  
`cluster.routing.allocation.enable`

More here [https://www.elastic.co/guide/en/elasticsearch/reference/current/shards-allocation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/shards-allocation.html)

---

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [March 25, 2016, 3:01am UTC](https://discuss.elastic.co/t/cluster-health-becomes-red-after-create-a-new-index/45332/3 "2016-03-25T03:01:09Z")

</div>

Thanks iliasse!  
You are right, the cluster.routing.allocation.enable was set to "none" accidentally by someone.  
After changing it back to "all", I am able to create new index.

---

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [March 25, 2016, 3:02am UTC](https://discuss.elastic.co/t/cluster-health-becomes-red-after-create-a-new-index/45332/4 "2016-03-25T03:02:57Z")

</div>

BTW: There is no any hint in Elasticsearch log why index creating failed. Is there any place to find detailed reason for such error?

---

<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:05pm UTC](https://discuss.elastic.co/t/cluster-health-becomes-red-after-create-a-new-index/45332/5 "2017-07-05T23:05:18Z")

</div>


