Elasticsearch Cluster Status Yellow

Hi,

I have created a cluster with two nodes.
Config on server1:

cluster.name: app.elasticsearch.prod
node.name: app.elasticsearch.prod.prod01

Config on server2:

cluster.name: app.elasticsearch.prod
node.name: app.elasticsearch.prod.prod02

I have stopped elasticsearch one server at a time couple of times for config modifications.
In head plugin of each server, I see the only one local elasticsearch.
Data is in sync. But seems like both are trying to be master nodes.

How can I resolve this?

Thanks.

I know I can set in one of the configuration that it cannot be master node.
But then I can't bounce the elasticsearch as there might be missing master node.
Please suggest.

What does the rest of your config (minus comments) look like?

All other config is default except this:

path.conf: ${ELASTIC}/conf
path.data: ${ELASTIC}/data
path.logs: ${ELASTIC}/logs
path.plugins: ${ELASTIC}/plugins

did u try adding other nodes' name in unicast list and trying: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#unicast

1 Like

Big ++ on that last one.

Also take a look at https://www.elastic.co/guide/en/elasticsearch/guide/current/_important_configuration_changes.html

Thanks @mosiddi, it worked.

@warkolm, We have only two servers in the cluster, and I see the recommendation to use 3 servers and quorum of 2.
Currently minimum_master_nodes is 1. Can we continue using this setting?

You can but you are at greater risk of split brain.

agreed with Mark.

Yes. We see the risk. Planning to add another server to the production to avoid it.
Thanks for your inputs.