# Elasticsearch 7.1 fresh install errors with "master not discovered exception" when security is enabled

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-1-fresh-install-errors-with-master-not-discovered-exception-when-security-is-enabled/182407>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [May 23, 2019, 10:49am UTC](https://discuss.elastic.co/t/elasticsearch-7-1-fresh-install-errors-with-master-not-discovered-exception-when-security-is-enabled/182407 "2019-05-23T10:49:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luigi\_Grilli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luigi_grilli/32/10397_2.png) [@Luigi\_Grilli](https://discuss.elastic.co/u/Luigi_Grilli)\
**Post date:** [May 23, 2019, 10:49am UTC](https://discuss.elastic.co/t/elasticsearch-7-1-fresh-install-errors-with-master-not-discovered-exception-when-security-is-enabled/182407/1 "2019-05-23T10:49:07Z")

</div>

I just installed es 7.1 using the msi package on a windows server 2012R2 box.

After install I checked the newly created cluster with a single node and health is green.

I enabled the xpack.security.enabled and restarted the es service.

Then I tried to setup the passwords as in the docs, but I get this error. I tried to say Yes and apply the passwords anyway, but it obviously failed.

If I disabled the xpack.security.enabled, the cluster starts just fine.

Any idea on what I'm doing wrong?

D:\Elastic\Elasticsearch\7.1.0\bin\>elasticsearch-setup-passwords.bat interactive

Failed to determine the health of the cluster running at [http://127.0.0.1:9200](http://127.0.0.1:9200)  
Unexpected response code [503] from calling GET [http://127.0.0.1:9200/\_cluster/health?pretty](http://127.0.0.1:9200/_cluster/health?pretty)  
Cause: master\_not\_discovered\_exception

It is recommended that you resolve the issues with your cluster before running e  
lasticsearch-setup-passwords.  
It is very likely that the password changes will fail when run against an unhealthy cluster.

Do you want to continue with the password setup process [y/N]

My config:

```
bootstrap.memory_lock: false
cluster.initial_master_nodes:
  - myhostname
cluster.name: mycluster
http.port: 9200
node.data: true
node.ingest: true
node.master: true
node.max_local_storage_nodes: 1
node.name: myhostname
path.data: D:\Elastic\Elasticsearch\data
path.logs: D:\Elastic\Elasticsearch\logs
transport.tcp.port: 9300
xpack.license.self_generated.type: basic
xpack.security.enabled: true
xpack.security.authc.accept_default_password: true
```

---

<div class="post-metadata">

**Author:** ![Luigi\_Grilli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luigi_grilli/32/10397_2.png) [@Luigi\_Grilli](https://discuss.elastic.co/u/Luigi_Grilli)\
**Post date:** [May 23, 2019, 11:21am UTC](https://discuss.elastic.co/t/elasticsearch-7-1-fresh-install-errors-with-master-not-discovered-exception-when-security-is-enabled/182407/2 "2019-05-23T11:21:54Z")

</div>

> [@Luigi\_Grilli](#):
>
> master\_not\_discovered\_exception

Apparently I was missing this parameter in the config. It works now:

`xpack.security.transport.ssl.enabled: true`

---

<div class="post-metadata">

**Author:** ![Prakash\_Rathod](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prakash_rathod/32/44564_2.png) [@Prakash\_Rathod](https://discuss.elastic.co/u/Prakash_Rathod)\
**Post date:** [May 27, 2019, 11:48am UTC](https://discuss.elastic.co/t/elasticsearch-7-1-fresh-install-errors-with-master-not-discovered-exception-when-security-is-enabled/182407/3 "2019-05-27T11:48:47Z")

</div>

Thanks alot.

---

<div class="post-metadata">

**Author:** ![Everton\_Azevedo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/everton_azevedo/32/47555_2.png) [@Everton\_Azevedo](https://discuss.elastic.co/u/Everton_Azevedo)\
**Post date:** [June 5, 2019, 1:25pm UTC](https://discuss.elastic.co/t/elasticsearch-7-1-fresh-install-errors-with-master-not-discovered-exception-when-security-is-enabled/182407/4 "2019-06-05T13:25:49Z")

</div>

Hello everyone, everything good?  
I'm having the same problem.  
I am trying to enable security in ElasticSearch 7.1.1.  
However I am taking the following error, when executing the command "elasticsearch-setup-passwords auto":

"Failed to determine the health of the cluster running at [http://192.168.70.71:9200](http://192.168.70.71:9200)  
Unexpected response code [503] from calling GET [http://192.168.70.71:9200/\_cluster/health?pretty](http://192.168.70.71:9200/_cluster/health?pretty)  
Cause: master\_not\_discovered\_exception"

There are three servers with the following configuration in the file elasticsearch.yml:

cluster.name: elk-cluster  
node.name: elk-node01  
path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch  
network.host: 0.0.0.0  
http.port: 9200  
discovery.seed\_providers: file  
cluster.initial\_master\_nodes: ["elk-node01", "elk-node02", "elk-node03"]  
xpack.security.enabled: true  
xpack.security.transport.ssl.enabled: true

The only parameter that changes from one node to another is the "node.name" (elk-node02 and elk-node03).  
Are there any other settings I need to adjust?

I thank you for your attention. Thank you.

---

<div class="post-metadata">

**Author:** ![Luigi\_Grilli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luigi_grilli/32/10397_2.png) [@Luigi\_Grilli](https://discuss.elastic.co/u/Luigi_Grilli)\
**Post date:** [June 5, 2019, 1:51pm UTC](https://discuss.elastic.co/t/elasticsearch-7-1-fresh-install-errors-with-master-not-discovered-exception-when-security-is-enabled/182407/5 "2019-06-05T13:51:38Z")

</div>

I think you probably need this:  
xpack.security.transport.ssl.enabled: true  
xpack.security.transport.ssl.verification\_mode: certificate  
xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12  
xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12

I followed this tutorial to set it up:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls.html)

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [June 7, 2019, 3:12am UTC](https://discuss.elastic.co/t/elasticsearch-7-1-fresh-install-errors-with-master-not-discovered-exception-when-security-is-enabled/182407/6 "2019-06-07T03:12:26Z")

</div>

@Everton_Azevedo please start a new thread with your question.

---

<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:** [July 5, 2019, 3:27am UTC](https://discuss.elastic.co/t/elasticsearch-7-1-fresh-install-errors-with-master-not-discovered-exception-when-security-is-enabled/182407/7 "2019-07-05T03:27:35Z")

</div>

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