# Getting master\_not\_discovered\_exception from node

**URL:** <https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840>\
**Category:** Elasticsearch\
**Created:** [April 12, 2021, 7:10am UTC](https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840 "2021-04-12T07:10:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![arielman2304](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@arielman2304](https://discuss.elastic.co/u/arielman2304)\
**Post date:** [April 12, 2021, 7:10am UTC](https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840/1 "2021-04-12T07:10:07Z")

</div>

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

> **[Getting Started with ElasticSearch Installation](https://botond-kopacz-84714.medium.com/getting-started-with-elasticsearch-installation-ecf44d06e7fe)**
>
> A complete guide for landing a working ElasticSearch 7.9 server from scratch to a secured, multi-node cluster exposed to internet with…

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?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 12, 2021, 8:30am UTC](https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840/2 "2021-04-12T08:30:01Z")

</div>

Welcome!

> [@arielman2304](#):
>
> I created 3 EC2 clusters in AWS, and I'm trying to set 2 of them as nodes.

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

> [@arielman2304](#):
>
> I followed this guideline:

Well. I'd recommend following instead the official documentation. And start from:[Set up Elasticsearch | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html)

Also the easiest way to have a cluster up and running is by clicking on [cloud.elastic.co](http://cloud.elastic.co) and start a cluster in few minutes.

> [@arielman2304](#):
>
> However, nothing helps and I'm still getting this exception from the nodes.

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](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

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

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

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.

> [@arielman2304](#):
>
> all ES are up and return response to curl, and also telnet to each other. what else can it be?

A wild guess is: [Important Elasticsearch configuration | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#discovery-settings)

---

<div class="post-metadata">

**Author:** ![arielman2304](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@arielman2304](https://discuss.elastic.co/u/arielman2304)\
**Post date:** [April 12, 2021, 8:40am UTC](https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840/3 "2021-04-12T08:40:54Z")

</div>

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

> <https://stackoverflow.com/questions/60736842/add-node-to-running-cluster-elasticsearch-causes-master-not-discovered-exception/60737587#60737587>

---

<div class="post-metadata">

**Author:** ![Rushay\_Trivedi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rushay_trivedi/32/86985_2.png) [@Rushay\_Trivedi](https://discuss.elastic.co/u/Rushay_Trivedi)\
**Post date:** [April 13, 2021, 1:19pm UTC](https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840/4 "2021-04-13T13:19:59Z")

</div>

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

```auto
network.host : 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,

```auto
cluster.initial_master_nodes: node-1

```

Thanks,  
Rushay Trivedi  
https:/www.rushkar.com

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 13, 2021, 1:37pm UTC](https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840/5 "2021-04-13T13:37:30Z")

</div>

> [@Rushay\_Trivedi](#):
>
> finally when had added below line, it works for me

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`](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#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.

---

<div class="post-metadata">

**Author:** ![Rushay\_Trivedi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rushay_trivedi/32/86985_2.png) [@Rushay\_Trivedi](https://discuss.elastic.co/u/Rushay_Trivedi)\
**Post date:** [April 13, 2021, 3:09pm UTC](https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840/6 "2021-04-13T15:09:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 13, 2021, 3:20pm UTC](https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840/7 "2021-04-13T15:20:19Z")

</div>

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

---

<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:** [May 11, 2021, 3:20pm UTC](https://discuss.elastic.co/t/getting-master-not-discovered-exception-from-node/269840/8 "2021-05-11T15:20:21Z")

</div>

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