Getting master_not_discovered_exception from node

I created 3 EC2 clusters in AWS, and I'm trying to set 2 of them as nodes. I followed this guideline:

However, nothing helps and I'm still getting this exception from the nodes.
all ES are up and return response to curl, and also telnet to each other. what else can it be?


What do you mean? "Data nodes"?
That's the default behavior of Elasticsearch so you basically do not need to do anything.

Well. I'd recommend following instead the official documentation. And start from:Set up Elasticsearch | Elasticsearch Guide [7.12] | Elastic

Also the easiest way to have a cluster up and running is by clicking on and start a cluster in few minutes.

Better to share the full logs so we might tell. Also the elasticsearch.yml files.

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:


This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

A wild guess is: Important Elasticsearch configuration | Elasticsearch Guide [7.12] | Elastic

actually, I was able to solved it by using this answer:

I had also same issue, when I was trying to access elastic search from outside AWS windows server, I was not able to access it, after that I have added : aws_private_ip

and after that we need to restart elastic service, but it was throwing an error in restarting, and finally when had added below line, it works for me,

cluster.initial_master_nodes: node-1

Rushay Trivedi

For the sake of future readers, this advice is not recommended as it may result in data loss. See the docs on cluster.initial_master_nodes for details, in particular:

IMPORTANT: After the cluster forms successfully for the first time, remove the cluster.initial_master_nodes setting from each nodes' configuration. Do not use this setting when restarting a cluster or adding a new node to an existing cluster.

1 Like

Okay got it, but without adding this line I am not able to start Elastic service in windows

If so, there's something else very wrong with your setup.

1 Like

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