# Elasticsearch cluster health intermittently flaps between 'GREEN' and 'YELLOW'

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136>\
**Category:** Elasticsearch\
**Created:** [November 16, 2018, 9:13pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136 "2018-11-16T21:13:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kriket](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kriket](https://discuss.elastic.co/u/kriket)\
**Post date:** [November 16, 2018, 9:13pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/1 "2018-11-16T21:13:37Z")

</div>

Elasticsearch version = 5.6.8

We are running a 7 node cluster with "ZERO" replicas, like this:

{  
"cluster\_name": "my\_cluster",  
"status": "green",  
"timed\_out": false,  
"number\_of\_nodes": 7,  
"number\_of\_data\_nodes": 7,  
"active\_primary\_shards": 3325,  
"active\_shards": 3325,  
"relocating\_shards": 0,  
"initializing\_shards": 0,  
"unassigned\_shards": 0,  
"delayed\_unassigned\_shards": 0,  
"number\_of\_pending\_tasks": 0,  
"number\_of\_in\_flight\_fetch": 0,  
"task\_max\_waiting\_in\_queue\_millis": 0,  
"active\_shards\_percent\_as\_number": 100.0  
}  
elasticsearch cluster state changes from "Green" to "Yellow" intermittently. The other interesting thing I noticed was during this intermittent cluster state changes, there is shard initializing taking place, which correlates with the cluster state changes. Is this due to the cluster running with "ZERO" replicas? What could cause the above behavior ?

---

<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:** [November 17, 2018, 2:20am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/2 "2018-11-17T02:20:03Z")

</div>

What do your logs show?  
Why are you running with no replicas?

---

<div class="post-metadata">

**Author:** ![kriket](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kriket](https://discuss.elastic.co/u/kriket)\
**Post date:** [November 17, 2018, 9:13pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/3 "2018-11-17T21:13:34Z")

</div>

We have a stand by cluster. So we made decision not have replicas. Both the primary and stand by have similar behavior. The logs do not have much information regarding the cluster state flapping. We haven't seen any out of memory errors either related to JVM heap size.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 18, 2018, 6:17am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/4 "2018-11-18T06:17:24Z")

</div>

YELLOW is a funny colour for a cluster with no replicas, because it means that all the primaries are assigned but there are unassigned replicas.

Please could you share the actual log messages that you're seeing? Without them all we can do is speculate. The answer may be contained in messages that do not look relevant at first sight, so don't hold back.

---

<div class="post-metadata">

**Author:** ![kriket](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kriket](https://discuss.elastic.co/u/kriket)\
**Post date:** [November 19, 2018, 7:29pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/5 "2018-11-19T19:29:46Z")

</div>

Is there a way I can drop the logs on this forum. I don't see an option to drop a file.

---

<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:** [November 19, 2018, 8:31pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/6 "2018-11-19T20:31:21Z")

</div>

You can paste them in, or use gist/pastebin/etc and link them.

Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

---

<div class="post-metadata">

**Author:** ![kriket](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kriket](https://discuss.elastic.co/u/kriket)\
**Post date:** [November 19, 2018, 9:25pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/7 "2018-11-19T21:25:29Z")

</div>

I have shared the logs via google drive. Here is the link. Thanks in advance to all you for your help.

The events where you see dropped metrics is where I found the cluster health flapping for brief moment to yellow state and then turn to Green. There is no data or service loss currently.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 20, 2018, 7:53am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/8 "2018-11-20T07:53:42Z")

</div>

I can't see any indication of changes in the cluster health in these logs, but there's only the one log file (from `lca1-app1361.corp.rapidms.com`). Was this the elected master at the time? If not can we have the master's logs?

How are you observing the cluster's health?

---

<div class="post-metadata">

**Author:** ![kriket](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kriket](https://discuss.elastic.co/u/kriket)\
**Post date:** [December 5, 2018, 12:38am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/9 "2018-12-05T00:38:07Z")

</div>

Sorry about the delay in response. I was out on vacation. I'll share the logs soon.

---

<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:** [January 2, 2019, 12:38am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-intermittently-flaps-between-green-and-yellow/157136/10 "2019-01-02T00:38:13Z")

</div>

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