# Elasticsearch 8.8: Master not discovered or elected yet, an election requires at least 2 nodes with ids from \[..\]

**URL:** <https://discuss.elastic.co/t/elasticsearch-8-8-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes-with-ids-from/338034>\
**Category:** Elasticsearch\
**Created:** [July 10, 2023, 3:19pm UTC](https://discuss.elastic.co/t/elasticsearch-8-8-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes-with-ids-from/338034 "2023-07-10T15:19:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhavya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavya/32/45679_2.png) [@bhavya](https://discuss.elastic.co/u/bhavya)\
**Post date:** [July 10, 2023, 3:19pm UTC](https://discuss.elastic.co/t/elasticsearch-8-8-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes-with-ids-from/338034/1 "2023-07-10T15:19:54Z")

</div>

I am creating a multinode cluster (3 Master Nodes), having the configuration like

```auto
xpack.ml.enabled: false
xpack.security.enabled: false
network.host: [_local_, _site_]
path.data: /data/esdata
path.logs: /data/logs
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12

cluster.name: XXX-es-prod
node.name: XXX-es-prod-m3
node.roles: ["master"]
cluster.initial_master_nodes:
        - XXX-es-prod-m1
discovery.seed_hosts:
 - 172.XX.XX:9300
 - 172.XX.XX:9300

search.allow_expensive_queries: false

```

When I start elasticsearch in all the 3 nodes, I am getting this error

> [2023-07-10T15:10:26,723][WARN][o.e.c.c.ClusterFormationFailureHelper] [XXX-es-prod-m3] master not discovered or elected yet, an election requires at least 2 nodes with ids from [T3Sqp5utTkaZRpgGB4fJbw, grN9lbg0QJ2zEXQcsawfQg, mE4YCC9qSX-81b2NzbHZIA], have only discovered non-quorum [{XXX-es-prod-m3}{T3Sqp5utTkaZRpgGB4fJbw}{qdzooCwxRBezB\_4tmqeyZw}{XXX-es-prod-m3}{172.XX.XX.X}{172.XX.XX.X:9300}{m}{8.8.2}, {XXX-es-prod-m2}{T3Sqp5utTkaZRpgGB4fJbw}{ShqjmPKBT4aDQXMxpxgzQA}{XXX-es-prod-m2}{172.XX.XX.X}{172.XX.XX.X:9300}{m}{8.8.2}, {XXX-es-prod-m1}{T3Sqp5utTkaZRpgGB4fJbw}{l\_xowlm9R0GTxehVtgT22w}{XXX-es-prod-m1}{172.XX.XX.X}{172.XX.XX.X:9300}{m}{8.8.2}]; discovery will continue using [172.XX.XX.X:9300, 172.XX.XX.X:9300] from hosts providers and [{XXX-es-prod-m3}{T3Sqp5utTkaZRpgGB4fJbw}{qdzooCwxRBezB\_4tmqeyZw}{XXX-es-prod-m3}{172.XX.XX.X}{172.XX.XX.X:9300}{m}{8.8.2}] from last-known cluster state; node term 4, last-accepted version 61 in term 4; for troubleshooting guidance, see [Troubleshooting discovery | Elasticsearch Guide [8.8] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.8/discovery-troubleshooting.html)

Can anyone please help me resolve this issue ?

---

<div class="post-metadata">

**Author:** ![vincenbr](https://avatars.discourse-cdn.com/v4/letter/v/8edcca/32.png) [@vincenbr](https://discuss.elastic.co/u/vincenbr)\
**Post date:** [July 12, 2023, 8:42am UTC](https://discuss.elastic.co/t/elasticsearch-8-8-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes-with-ids-from/338034/2 "2023-07-12T08:42:13Z")

</div>

Hi,  
At first sight, it looks like a cluster has already formed, and it does not match in some way with your current configuration.  
Please read [Bootstrapping a cluster | Elasticsearch Guide [8.8] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html) , it clarifies cluster formation mechanisms.  
In your case (assuming you don't have any valuable indexed data or cluster assets), I would

- remove `path.data` contents on each node
- add all 3 nodes names in `cluster.initial_master_nodes`
- restart your cluster

And also make sure that you have at least one `data` node (not clear from you post)!

---

<div class="post-metadata">

**Author:** ![bhavya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavya/32/45679_2.png) [@bhavya](https://discuss.elastic.co/u/bhavya)\
**Post date:** [July 13, 2023, 5:17am UTC](https://discuss.elastic.co/t/elasticsearch-8-8-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes-with-ids-from/338034/3 "2023-07-13T05:17:48Z")

</div>

Thanks @vincenbr ! After removing `path.data` content on each node and restarting the cluster, the issue got fixed.

---

<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:** [August 10, 2023, 5:17am UTC](https://discuss.elastic.co/t/elasticsearch-8-8-master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes-with-ids-from/338034/4 "2023-08-10T05:17:49Z")

</div>

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