# We have cluster of 4 nodes, where 2 nodes are master and data and other 2 nodes are data nodes, the configuration was working fine since 2 yrs, today we have to restart the cluster and since then we are getting master not discovered exception

**URL:** <https://discuss.elastic.co/t/we-have-cluster-of-4-nodes-where-2-nodes-are-master-and-data-and-other-2-nodes-are-data-nodes-the-configuration-was-working-fine-since-2-yrs-today-we-have-to-restart-the-cluster-and-since-then-we-are-getting-master-not-discovered-exception/340122>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [August 4, 2023, 10:50am UTC](https://discuss.elastic.co/t/we-have-cluster-of-4-nodes-where-2-nodes-are-master-and-data-and-other-2-nodes-are-data-nodes-the-configuration-was-working-fine-since-2-yrs-today-we-have-to-restart-the-cluster-and-since-then-we-are-getting-master-not-discovered-exception/340122 "2023-08-04T10:50:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 4, 2023, 12:54pm UTC](https://discuss.elastic.co/t/we-have-cluster-of-4-nodes-where-2-nodes-are-master-and-data-and-other-2-nodes-are-data-nodes-the-configuration-was-working-fine-since-2-yrs-today-we-have-to-restart-the-cluster-and-since-then-we-are-getting-master-not-discovered-exception/340122/3 "2023-08-04T12:54:46Z")

</div>

Hello,

You had a similar issue a couple of days ago where it was suggest to **remove** the data nodes from the `discovery.seed_hosts` settings and also use the default value for the allocation settings, it was [this issue](https://discuss.elastic.co/t/i-have-a-cluster-with-4-nodes-2-master-and-2-data-nodes-currently-only-one-master-is-responding-all-the-other-nodes-connect-for-10-mins-and-shard-allocation-start-then-again-it-becomes-na-not-sure-what-is-the-issue/339012/4).

But it seems that you didn't change anything.

Also, you are using non-default ports, if I'm not wrong you need to specify that in the `discovery.seed_hosts`.

Your `discovery.seed_hosts` needs to look like this in both of your masters, change it and try to restart them again.

```auto
discovery.seed_hosts: ["ES-Master-1:9840", "ES-Master-2:9840"]

```

---

_[View the full topic](https://discuss.elastic.co/t/we-have-cluster-of-4-nodes-where-2-nodes-are-master-and-data-and-other-2-nodes-are-data-nodes-the-configuration-was-working-fine-since-2-yrs-today-we-have-to-restart-the-cluster-and-since-then-we-are-getting-master-not-discovered-exception/340122)._
