# "Master not discovered exception" after following your guide

**URL:** <https://discuss.elastic.co/t/master-not-discovered-exception-after-following-your-guide/179385>\
**Category:** Elasticsearch\
**Created:** [May 2, 2019, 2:20pm UTC](https://discuss.elastic.co/t/master-not-discovered-exception-after-following-your-guide/179385 "2019-05-02T14:20:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kent120103](https://avatars.discourse-cdn.com/v4/letter/k/ac91a4/32.png) [@kent120103](https://discuss.elastic.co/u/kent120103)\
**Post date:** [May 2, 2019, 2:20pm UTC](https://discuss.elastic.co/t/master-not-discovered-exception-after-following-your-guide/179385/1 "2019-05-02T14:20:03Z")

</div>

Hi, Elastic team.

I followed this guide ([https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls-docker.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls-docker.html)) to create a cluster locally and play with SSH/TLS connection.

After running "docker-compose up -d" first time, I am able to create an index and insert a document.

Then I run "docker-compose down". Next day, after running "docker-compose up -d" again, I cannot fetch my index. I tried the same request twice. First exception is SSL. Second time, it is "Master not discovered exception"

`b-0003:$ curl --cacert certs/ca/ca.crt -u elastic:PleaseChangeMe -X GET [https://localhost:9200/\_aliases](https://localhost:9200/_aliases)

curl: (35) LibreSSL SSL\_connect: SSL\_ERROR\_SYSCALL in connection to localhost:9200

b-0003:$ curl --cacert certs/ca/ca.crt -u elastic:PleaseChangeMe -X GET [https://localhost:9200/\_aliases](https://localhost:9200/_aliases)

{"error":{"root\_cause":[{"type":"master\_not\_discovered\_exception","reason":null}],"type":"master\_not\_discovered\_exception","reason":null},"status":503}`

Did I do something wrong?

I also try these two requests:

b-003:$ curl --cacert certs/ca/ca.crt -u elastic:PleaseChangeMe [https://localhost:9200](https://localhost:9200)  
{  
"name" : "es01",  
"cluster\_name" : "docker-cluster",  
"cluster\_uuid" : "_na_",  
"version" : {  
"number" : "7.0.0",  
"build\_flavor" : "default",  
"build\_type" : "docker",  
"build\_hash" : "b7e28a7",  
"build\_date" : "2019-04-05T22:55:32.697037Z",  
"build\_snapshot" : false,  
"lucene\_version" : "8.0.0",  
"minimum\_wire\_compatibility\_version" : "6.7.0",  
"minimum\_index\_compatibility\_version" : "6.0.0-beta1"  
},  
"tagline" : "You Know, for Search"  
}

b-0003:$ curl --cacert certs/ca/ca.crt -u elastic:PleaseChangeMe [https://localhost:9200/\_nodes/transport](https://localhost:9200/_nodes/transport)

{  
"\_nodes": {  
"total": 1,  
"successful": 1,  
"failed": 0  
},  
"cluster\_name": "docker-cluster",  
"nodes": {  
"-eOOoCOYTV65POSt7Uuhgg": {  
"name": "es01",  
"transport\_address": "172.23.0.2:9300",  
"host": "172.23.0.2",  
"ip": "172.23.0.2",  
"version": "7.0.0",  
"build\_flavor": "default",  
"build\_type": "docker",  
"build\_hash": "b7e28a7",  
"roles": [  
"master",  
"data",  
"ingest"  
],  
"attributes": {  
"ml.machine\_memory": "2095869952",  
"xpack.installed": "true",  
"ml.max\_open\_jobs": "20"  
},  
"transport": {  
"bound\_address": [  
"0.0.0.0:9300"  
],  
"publish\_address": "172.23.0.2:9300",  
"profiles": {}  
}  
}  
}  
}

---

<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:** [May 2, 2019, 2:53pm UTC](https://discuss.elastic.co/t/master-not-discovered-exception-after-following-your-guide/179385/2 "2019-05-02T14:53:48Z")

</div>

Hi @kent120103,

I think you have been hit by a similar issue to the one fixed in [#41394](https://github.com/elastic/elasticsearch/pull/41394). I was unaware that the linked page existed so I didn't fix it at the same time.

Could you try adding `discovery.seed_hosts=es02` to the config for `es01`, similarly to how `es02`'s config says `discovery.seed_hosts=es01`? This allows each node to find the other, and it should be symmetric but it seems it is not.

If that doesn't help, could you share the logs you're seeing?

---

<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:** [May 2, 2019, 2:58pm UTC](https://discuss.elastic.co/t/master-not-discovered-exception-after-following-your-guide/179385/3 "2019-05-02T14:58:23Z")

</div>

I opened [https://github.com/elastic/elasticsearch/pull/41753](https://github.com/elastic/elasticsearch/pull/41753).

---

<div class="post-metadata">

**Author:** ![kent120103](https://avatars.discourse-cdn.com/v4/letter/k/ac91a4/32.png) [@kent120103](https://discuss.elastic.co/u/kent120103)\
**Post date:** [May 3, 2019, 10:58am UTC](https://discuss.elastic.co/t/master-not-discovered-exception-after-following-your-guide/179385/4 "2019-05-03T10:58:31Z")

</div>

@DavidTurner

Thank you so much. It works.

---

<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 31, 2019, 10:58am UTC](https://discuss.elastic.co/t/master-not-discovered-exception-after-following-your-guide/179385/5 "2019-05-31T10:58:37Z")

</div>

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