# ES health api returns green on one node but yellow on another

**URL:** <https://discuss.elastic.co/t/es-health-api-returns-green-on-one-node-but-yellow-on-another/9942>\
**Category:** Elasticsearch\
**Created:** [December 5, 2012, 12:18am UTC](https://discuss.elastic.co/t/es-health-api-returns-green-on-one-node-but-yellow-on-another/9942 "2012-12-05T00:18:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![T\_Vinod\_Gupta](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@T\_Vinod\_Gupta](https://discuss.elastic.co/u/T_Vinod_Gupta)\
**Post date:** [December 5, 2012, 12:18am UTC](https://discuss.elastic.co/t/es-health-api-returns-green-on-one-node-but-yellow-on-another/9942/1 "2012-12-05T00:18:30Z")

</div>

what could be the reason? i dont see any specific problems from the logs..

one node says this -  
curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
{  
"cluster\_name" : "elasticsearch",  
"status" : "yellow",  
"timed\_out" : false,  
"number\_of\_nodes" : 2,  
"number\_of\_data\_nodes" : 1,  
"active\_primary\_shards" : 42,  
"active\_shards" : 42,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 41  
}

on the other node, it says -  
curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
{  
"cluster\_name" : "elasticsearch",  
"status" : "green",  
"timed\_out" : false,  
"number\_of\_nodes" : 3,  
"number\_of\_data\_nodes" : 2,  
"active\_primary\_shards" : 42,  
"active\_shards" : 84,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 0  
}

thanks

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [December 5, 2012, 12:46am UTC](https://discuss.elastic.co/t/es-health-api-returns-green-on-one-node-but-yellow-on-another/9942/2 "2012-12-05T00:46:53Z")

</div>

The number of nodes is different on each nodes, which means you probably  
have two clusters. Use the cluster API to find out which nodes each node is  
connected to.

[http://localhost:9200/\_cluster/nodes](http://localhost:9200/_cluster/nodes)

On Tue, Dec 4, 2012 at 4:18 PM, T Vinod Gupta [tvinod@readypulse.com](mailto:tvinod@readypulse.com) wrote:

> what could be the reason? i dont see any specific problems from the logs..
> 
> one node says this -  
> curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
> {  
> "cluster\_name" : "elasticsearch",  
> "status" : "yellow",  
> "timed\_out" : false,  
> "number\_of\_nodes" : 2,  
> "number\_of\_data\_nodes" : 1,  
> "active\_primary\_shards" : 42,  
> "active\_shards" : 42,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 41  
> }
> 
> on the other node, it says -  
> curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
> {  
> "cluster\_name" : "elasticsearch",  
> "status" : "green",  
> "timed\_out" : false,  
> "number\_of\_nodes" : 3,  
> "number\_of\_data\_nodes" : 2,  
> "active\_primary\_shards" : 42,  
> "active\_shards" : 84,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 0  
> }
> 
> thanks
> 
> --

--

---

<div class="post-metadata">

**Author:** ![T\_Vinod\_Gupta](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@T\_Vinod\_Gupta](https://discuss.elastic.co/u/T_Vinod_Gupta)\
**Post date:** [December 5, 2012, 12:54am UTC](https://discuss.elastic.co/t/es-health-api-returns-green-on-one-node-but-yellow-on-another/9942/3 "2012-12-05T00:54:34Z")

</div>

i only have 1 cluster.. i did run this api on both machines.. the green  
machine see all 3 machines but the yellow node doesnt see the node that is  
showing green..  
so it is some sort of communication failure..

i do see this message in the log -  
[2012-12-03 06:36:03,426][WARN][discovery.ec2] [Mister  
Machine] master should not receive new cluster state from [[Phimster,  
Ellie][Y6I9PXqYSeGkPpdZIDurVQ][inet[/10.6.14.94:9300]]]

mister machine is the yellow machine and phimster,ellie is the green  
machine.

thanks

On Tue, Dec 4, 2012 at 4:46 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> The number of nodes is different on each nodes, which means you probably  
> have two clusters. Use the cluster API to find out which nodes each node is  
> connected to.
> 
> [http://localhost:9200/\_cluster/nodes](http://localhost:9200/_cluster/nodes)
> 
> On Tue, Dec 4, 2012 at 4:18 PM, T Vinod Gupta [tvinod@readypulse.com](mailto:tvinod@readypulse.com)wrote:
> 
> > what could be the reason? i dont see any specific problems from the logs..
> > 
> > one node says this -  
> > curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
> > {  
> > "cluster\_name" : "elasticsearch",  
> > "status" : "yellow",  
> > "timed\_out" : false,  
> > "number\_of\_nodes" : 2,  
> > "number\_of\_data\_nodes" : 1,  
> > "active\_primary\_shards" : 42,  
> > "active\_shards" : 42,  
> > "relocating\_shards" : 0,  
> > "initializing\_shards" : 0,  
> > "unassigned\_shards" : 41  
> > }
> > 
> > on the other node, it says -  
> > curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
> > {  
> > "cluster\_name" : "elasticsearch",  
> > "status" : "green",  
> > "timed\_out" : false,  
> > "number\_of\_nodes" : 3,  
> > "number\_of\_data\_nodes" : 2,  
> > "active\_primary\_shards" : 42,  
> > "active\_shards" : 84,  
> > "relocating\_shards" : 0,  
> > "initializing\_shards" : 0,  
> > "unassigned\_shards" : 0  
> > }
> > 
> > thanks
> > 
> > --
> 
> --

--

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [December 5, 2012, 12:15pm UTC](https://discuss.elastic.co/t/es-health-api-returns-green-on-one-node-but-yellow-on-another/9942/4 "2012-12-05T12:15:34Z")

</div>

With what kind of network are the nodes connected to each other? If  
the network is 'slow' you might want to increase the  
`discovery.zen.ping.timeout` to a higher value (default is 3s).

What also could be the reason is that a node doesn't see another node  
is that a machine is running low on system resources, like memory. For  
that reason that node can't properly respond to ping requests. Can you  
check with the node stats api ([http://localhost:9200/\_nodes/stats?jvm](http://localhost:9200/_nodes/stats?jvm))  
if all your nodes have sufficient resources?

Did you also configured the 'discovery.zen.minimum\_master\_nodes'  
option? This can prevent the situation that a cluster has more than  
one master (also known as split brain and can be a very annoying  
situation). This number should be set to number\_of\_nodes / 2 + 1 and  
in your case this should be set to 2.

From the log line you shared with us, it seems that you more than one  
master in your cluster.

Martijn

On 5 December 2012 01:54, T Vinod Gupta [tvinod@readypulse.com](mailto:tvinod@readypulse.com) wrote:

> i only have 1 cluster.. i did run this api on both machines.. the green  
> machine see all 3 machines but the yellow node doesnt see the node that is  
> showing green..  
> so it is some sort of communication failure..
> 
> i do see this message in the log -  
> [2012-12-03 06:36:03,426][WARN][discovery.ec2] [Mister Machine]  
> master should not receive new cluster state from [[Phimster,  
> Ellie][Y6I9PXqYSeGkPpdZIDurVQ][inet[/10.6.14.94:9300]]]
> 
> mister machine is the yellow machine and phimster,ellie is the green  
> machine.
> 
> thanks
> 
> On Tue, Dec 4, 2012 at 4:46 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> 
> > The number of nodes is different on each nodes, which means you probably  
> > have two clusters. Use the cluster API to find out which nodes each node is  
> > connected to.
> > 
> > [http://localhost:9200/\_cluster/nodes](http://localhost:9200/_cluster/nodes)
> > 
> > On Tue, Dec 4, 2012 at 4:18 PM, T Vinod Gupta [tvinod@readypulse.com](mailto:tvinod@readypulse.com)  
> > wrote:
> > 
> > > what could be the reason? i dont see any specific problems from the  
> > > logs..
> > > 
> > > one node says this -  
> > > curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
> > > {  
> > > "cluster\_name" : "elasticsearch",  
> > > "status" : "yellow",  
> > > "timed\_out" : false,  
> > > "number\_of\_nodes" : 2,  
> > > "number\_of\_data\_nodes" : 1,  
> > > "active\_primary\_shards" : 42,  
> > > "active\_shards" : 42,  
> > > "relocating\_shards" : 0,  
> > > "initializing\_shards" : 0,  
> > > "unassigned\_shards" : 41  
> > > }
> > > 
> > > on the other node, it says -  
> > > curl -XGET '[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true)'  
> > > {  
> > > "cluster\_name" : "elasticsearch",  
> > > "status" : "green",  
> > > "timed\_out" : false,  
> > > "number\_of\_nodes" : 3,  
> > > "number\_of\_data\_nodes" : 2,  
> > > "active\_primary\_shards" : 42,  
> > > "active\_shards" : 84,  
> > > "relocating\_shards" : 0,  
> > > "initializing\_shards" : 0,  
> > > "unassigned\_shards" : 0  
> > > }
> > > 
> > > thanks
> > > 
> > > --
> > 
> > --
> 
> --

--  
Met vriendelijke groet,

Martijn van Groningen

--

---

<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 6, 2017, 3:01am UTC](https://discuss.elastic.co/t/es-health-api-returns-green-on-one-node-but-yellow-on-another/9942/5 "2017-07-06T03:01:19Z")

</div>


