# Elastic search master issue

**URL:** <https://discuss.elastic.co/t/elastic-search-master-issue/360861>\
**Category:** Elasticsearch\
**Created:** [June 5, 2024, 1:29pm UTC](https://discuss.elastic.co/t/elastic-search-master-issue/360861 "2024-06-05T13:29:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gedrasaknagufum.com](https://avatars.discourse-cdn.com/v4/letter/g/c6cbf5/32.png) [@gedrasaknagufum.com](https://discuss.elastic.co/u/gedrasaknagufum.com)\
**Post date:** [June 5, 2024, 1:29pm UTC](https://discuss.elastic.co/t/elastic-search-master-issue/360861/1 "2024-06-05T13:29:37Z")

</div>

Jun 05 13:00:53 ip-172-31-43-63 elasticsearch[505]: [2024-06-05T13:00:53,419][INFO][o.e.x.s.a.AuthenticationService] [es\_euwest\_prd\_ec2\_2] Authentication of [elastic] was terminated by realm [rese  
rved] - failed to authenticate user [elastic]  
Jun 05 13:00:53 ip-172-31-43-63 elasticsearch[505]: [2024-06-05T13:00:53,521][INFO][o.e.x.s.a.AuthenticationService] [es\_euwest\_prd\_ec2\_2] Authentication of [elastic] was terminated by realm [rese  
rved] - failed to authenticate user [elastic]  
Jun 05 13:00:54 ip-172-31-43-63 elasticsearch[505]: [2024-06-05T13:00:54,768][WARN][o.e.c.c.ClusterFormationFailureHelper] [es\_euwest\_prd\_ec2\_2] master not discovered or elected yet, an election r  
equires at least 2 nodes with ids from [b4neNNbhSCuBmrDRoiCOYA, -N7Cqt1UQgqO0x558XXjFg, hNeYTYIsSES7A7eobhOMhQ], have discovered [{es\_euwest\_swinnr\_prd\_ec2\_2}{hNeYTYIsSES7A7eobhOMhQ}{T5D446xeS\_KGJ5TJBtIl5  
w}{172.31.43.63}{172.31.43.63:9300}{dim}{aws\_availability\_zone=eu-west-1b, ml.machine\_memory=3910221824, xpack.installed=true, ml.max\_open\_jobs=20}] which is not a quorum; discovery will continue using [1  
27.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305, 172.31.27.100:9300, 172.31.43.63:9300, 172.31.11.13:9300] from ho  
sts providers and [{es\_euwest\_prd\_ec2\_2}{hNeYTYIsSES7A7eobhOMhQ}{T5D446xeS\_KGJ5TJBtIl5w}{172.31.43.63}{172.31.43.63:9300}{dim}{aws\_availability\_zone=eu-west-1b, ml.machine\_memory=3910221824, xpack.  
installed=true, ml.max\_open\_jobs=20}] from last-known cluster state; node term 53, last-accepted version 1182 in term 53  
Jun 05 13:01:04 ip-172-31-43-63 elasticsearch[505]: [2024-06-05T13:01:04,769][WARN][o.e.c.c.ClusterFormationFailureHelper] [es\_prd\_ec2\_2] master not discovered or elected yet, an election r  
equires at least 2 nodes with ids from [b4neNNbhSCuBmrDRoiCOYA, -N7Cqt1UQgqO0x558XXjFg, hNeYTYIsSES7A7eobhOMhQ], have discovered [{es\_euwest\_swinnr\_prd\_ec2\_2}{hNeYTYIsSES7A7eobhOMhQ}{T5D446xeS\_KGJ5TJBtIl5  
w}{172.31.43.63}{172.31.43.63:9300}{dim}{aws\_availability\_zone=eu-west-1b, ml.machine\_memory=3910221824, xpack.installed=true, ml.max\_open\_jobs=20}] which is not a quorum; discovery will continue using [1  
27.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305, 172.31.27.100:9300, 172.31.43.63:9300, 172.31.11.13:9300] from ho  
sts providers and [{es\_euwest\_prd\_ec2\_2}{hNeYTYIsSES7A7eobhOMhQ}{T5D446xeS\_KGJ5TJBtIl5w}{172.31.43.63}{172.31.43.63:9300}{dim}{aws\_availability\_zone=eu-west-1b, ml.machine\_memory=3910221824, xpack.  
installed=true, ml.max\_open\_jobs=20}] from last-known cluster state; node term 53, last-accepted version 1182 in term 53

curl -X GET '[http://localhost:9200](http://localhost:9200)'  
{"error":{"root\_cause":[{"type":"security\_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security\_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}Preformatted text

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [June 5, 2024, 1:35pm UTC](https://discuss.elastic.co/t/elastic-search-master-issue/360861/2 "2024-06-05T13:35:29Z")

</div>

Hi @gedrasaknagufum.com,

Welcome! I see you've posted log snippets without a lot of context. Can you please give more information such as the version of Elasticsearch you are using, how you are running Elasticsearch, what behaviour you are seeing or what issue you are trying to solve?

Looking at the logs snippets I see a couple of potential issues:

1. You have an authentication issue:

> [@gedrasaknagufum.com](#):
>
> [o.e.x.s.a.AuthenticationService] [es\_euwest\_prd\_ec2\_2] Authentication of [elastic] was terminated by realm [rese  
> rved] - failed to authenticate user [elastic]

1. There is an issue finding the master node:

> [@gedrasaknagufum.com](#):
>
> Jun 05 13:00:54 ip-172-31-43-63 elasticsearch[505]: [2024-06-05T13:00:54,768][WARN][o.e.c.c.ClusterFormationFailureHelper] [es\_euwest\_prd\_ec2\_2] master not discovered or elected yet

If it's your first time spinning up the cluster you may need to set property `cluster.initial_master_nodes` [as covered here](https://discuss.elastic.co/t/master-not-discovered-or-elected-yet-an-election-requires-at-least-2-nodes-with-ids-elk-stack-docker-swarm/325548). Alternatively I would look at [this article](https://opster.com/guides/elasticsearch/operations/elasticsearch-master-node-not-discovered/) which discusses some potential causes.

Hope that helps!
