"Master not discovered exception" after following your guide

Hi, Elastic team.

I followed this guide (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

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

{"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
{
"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

{
"_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": {}
}
}
}
}

Hi @kent120103,

I think you have been hit by a similar issue to the one fixed in #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?

I opened https://github.com/elastic/elasticsearch/pull/41753.

@DavidTurner

Thank you so much. It works.

1 Like

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