# Getting error like master not discovered or elected yet, an election requires at least 2 nodes

**URL:** <https://discuss.elastic.co/t/getting-error-like-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes/227901>\
**Category:** Elasticsearch\
**Created:** [April 14, 2020, 11:30am UTC](https://discuss.elastic.co/t/getting-error-like-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes/227901 "2020-04-14T11:30:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![raj31391](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj31391/32/47522_2.png) [@raj31391](https://discuss.elastic.co/u/raj31391)\
**Post date:** [April 14, 2020, 11:30am UTC](https://discuss.elastic.co/t/getting-error-like-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes/227901/1 "2020-04-14T11:30:04Z")

</div>

```
    Getting below error while starting the elastic search node
    [2020-04-14T16:53:34,444][WARN][o.e.c.c.ClusterFormationFailureHelper] [node-1] master not discovered or elected yet, an election requires at least 2 nodes with ids from [p2sTOYioT6uQanoEDVaBYQ, EfEYNF_aT5u-STeZJvr4rA, usQfRR2kQn2obQgEkXu1aw], have discovered [{node-1}{EfEYNF_aT5u-STeZJvr4rA}{38p1G27HTC2tMzIqnDsDOg}{127.0.0.1}{127.0.0.1:9305}{dilm}{ml.machine_memory=8457457664, xpack.installed=true, ml.max_open_jobs=20}] which is not a quorum; discovery will continue using [127.0.0.1:9300] from hosts providers and [{node-1}{EfEYNF_aT5u-STeZJvr4rA}{38p1G27HTC2tMzIqnDsDOg}{127.0.0.1}{127.0.0.1:9305}{dilm}{ml.machine_memory=8457457664, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 1, last-accepted version 53 in term 1

Details in elasticsearch.yml file
cluster.name: my-application
node.name: node-1
node.master: true
network.host: 127.0.0.1
http.port: 9200
transport.tcp.port: 9305
transport.publish_port: 9305
discovery.seed_hosts: ["127.0.0.1:9305","127.0.0.1:9300"]
```

---

<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 14, 2020, 11:37am UTC](https://discuss.elastic.co/t/getting-error-like-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes/227901/2 "2020-04-14T11:37:40Z")

</div>

This node used to belong to a cluster with three (or more) master-eligible nodes but it now cannot discover any other master-eligible nodes.

See [Adding and removing nodes | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-adding-removing-nodes.html) for more details, particularly:

> if you shut down half or more of the master-eligible nodes all at the same time then the cluster will normally become unavailable. If this happens then you can bring the cluster back online by starting the removed nodes again.

---

<div class="post-metadata">

**Author:** ![raj31391](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj31391/32/47522_2.png) [@raj31391](https://discuss.elastic.co/u/raj31391)\
**Post date:** [April 14, 2020, 11:45am UTC](https://discuss.elastic.co/t/getting-error-like-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes/227901/3 "2020-04-14T11:45:19Z")

</div>

What should i do here to get rid of this error?

---

<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 14, 2020, 12:24pm UTC](https://discuss.elastic.co/t/getting-error-like-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes/227901/4 "2020-04-14T12:24:37Z")

</div>

> [@raj31391](#):
>
> What should i do here to get rid of this error?

This is answered above, in the section of the docs I quoted:

> [@DavidTurner](#):
>
> If this happens then you can bring the cluster back online by starting the removed nodes again.

---

<div class="post-metadata">

**Author:** ![raj31391](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj31391/32/47522_2.png) [@raj31391](https://discuss.elastic.co/u/raj31391)\
**Post date:** [April 14, 2020, 12:39pm UTC](https://discuss.elastic.co/t/getting-error-like-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes/227901/5 "2020-04-14T12:39:45Z")

</div>

```auto
Am learning elastic search in my laptop. And so am having three instances(nodes) by having elastic search in three different folders. Whenever am restarting any of the nodes, am getting this error. Could you please help me in this regard?

```

---

<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 12, 2020, 12:39pm UTC](https://discuss.elastic.co/t/getting-error-like-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes/227901/6 "2020-05-12T12:39:54Z")

</div>

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