Getting org.elasticsearch.discovery.MasterNotDiscoveredException, while I use only one node

I'm running elasticsearch (7.6.2) on RHEL 6.1 with only one node and I get:

org.elasticsearch.discovery.MasterNotDiscoveredException

org.elasticsearch.discovery.MasterNotDiscoveredException
This is my elasticsearch.yml:

> cluster.name: es-prod01
> node.name: node-1
> 
> node.max_local_storage_nodes: 1
> 
> path.data: /data/disk05,/data/disk06
> 
> path.logs: /var/log/elasticsearch
> 
> bootstrap.memory_lock: true

From all I read, it seems the configuration is good but I can't overcome this error.
Any ideas?

From elasticsearch documentation

"If you don’t configure this setting, then the node has the following roles by default: master , data , ingest , ml"
Since I have only one node, and I didn't define node.roles I think the error "MasterNotDiscoveredException" should never raised.

How can it possible that elasticsearch instance don't find itself?

Take a look at https://www.elastic.co/guide/en/elasticsearch/reference/7.6/discovery-settings.html

Thanks Mark.
I will describe what happen to my system maybe it will help others.
I has a system with 5 nodes. In some point I was asked to use only one node since this system wasn't in real use. So I moved all indices to one node and use it. All was good in the beginning but when I tried to save some visualizations and search I get errors. After investigation I found this discussion Getting "master not discovered or elected yet" causing cluster not up in version 7.1.0 and I saw David's answer about the problem that can be if some nodes were dropped from the system. I deleted all my data from path.data but I still had the same issue. After your answer I read here that in the first time we bootstrap a cluster we must define cluster.initial_master_nodes so I did it and now it looks good.
Thanks

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