Yellow status sfter creating cluster


in the past I had one elasticsearch and today I created another node the cluster created. when I run
GET /_cat/health?v
I got status YELLOW. How I will make the status GREEN

(David Pilato) #2

Add more nodes or decrease the number of replicas

(Melvyn Peignon) #3


I think some terms need to be defined or redefined:

A node is an instance of Elasticsearch.
A cluster is a collection of one or more node.

In your case I believe you created a new index. An index by default is created with 5 primary shards and one replica for every one of those shard. If you have only one node, your replicas cannot be allocated, resulting in a yellow cluster. As David says the solution would be to set your number of replica to zero or to add one more node.


Thank you,

I am using the default shards and replica numbers (5 shareds and 1 replica)

What is the equation of replica with number of nodes??

(Melvyn Peignon) #5

A primary and a replica (of the same shard) cannot be allocated to the same node (it would be useless).

Like often when it comes to architecture: it will depend on different factors like how many server do you expect to fail and so on.

(David Pilato) #6

To allocate replicas, you need more than one node.

Replicas are not going to be allocated on the same node as primaries as it is pretty much useless.

(system) #7

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