# 7.0 master not discovered yet

**URL:** <https://discuss.elastic.co/t/7-0-master-not-discovered-yet/181040>\
**Category:** Elasticsearch\
**Created:** [May 14, 2019, 4:18pm UTC](https://discuss.elastic.co/t/7-0-master-not-discovered-yet/181040 "2019-05-14T16:18:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jun.li](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@jun.li](https://discuss.elastic.co/u/jun.li)\
**Post date:** [May 14, 2019, 4:18pm UTC](https://discuss.elastic.co/t/7-0-master-not-discovered-yet/181040/1 "2019-05-14T16:18:51Z")

</div>

I am having difficulty to migrate from 6.4 to 7. In QA env, I would like to form a cluster with 2 hosts psclxd00546 and psclxd00547. The error message I'm getting is:

[2019-05-14T11:38:49,908][WARN][o.e.c.c.ClusterFormationFailureHelper] [psclxd00547] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [psclxd00546, psclxd00547] to bootstrap a cluster: have discovered ; discovery will continue using [10.41.229.125:9300, 10.41.229.126:9300] from hosts providers and [{psclxd00547}{OezZQFHxRiSXLXflu-M0\_g}{TrIkeEfkTRCnHQnvSH5vQQ}{127.0.0.1}{127.0.0.1:9300}{ml.machine\_memory=101115412480, xpack.installed=true, ml.max\_open\_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

Below is my elasticsearch.yml on host psclxd00547.

```
cluster.name: my_qa
node.name: psclxd00547
node.master: true
node.data: true
node.ingest: false
cluster.remote.connect: false
node.max_local_storage_nodes: 1
discovery.seed_hosts: ["psclxd00546","psclxd00547"]
cluster.initial_master_nodes: ["psclxd00546", "psclxd00547"]

```

Could anyone please point out what went wrong here?

Many thanks  
Jun

---

<div class="post-metadata">

**Author:** ![jun.li](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@jun.li](https://discuss.elastic.co/u/jun.li)\
**Post date:** [May 15, 2019, 11:47am UTC](https://discuss.elastic.co/t/7-0-master-not-discovered-yet/181040/2 "2019-05-15T11:47:21Z")

</div>

I managed to get it work.. well to some extent.

First I changed the initial\_master\_nodes on psclxd00547 to:

> cluster.initial\_master\_nodes: ["psclxd00547"]

Afterwards I managed to start up ES on psclxd00547 OK. I then add psclxd00546 back as it is below:

> cluster.initial\_master\_nodes: ["psclxd00546", "psclxd00547"]

Restart psclxd00547, still OK. I think once a master node is formed, this initial\_master\_nodes is ignored.. maybe.

I then start up ES on psclxd00546 with pretty much the same config. Now I have 1 master plus 1 node.

Question -

- List item

What should I do if I want both as Master node?  
What is the recommended setup if I only have 2 servers? 1 master or 2 masters?

---

<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 15, 2019, 7:19pm UTC](https://discuss.elastic.co/t/7-0-master-not-discovered-yet/181040/3 "2019-05-15T19:19:09Z")

</div>

> [@jun.li](#):
>
> I think once a master node is formed, this initial\_master\_nodes is ignored.. maybe.

Yes, that's right. From [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html):

> After the cluster has formed, this setting is no longer required and is ignored.

> [@jun.li](#):
>
> I then start up ES on psclxd00546 with pretty much the same config.

Since you've already bootstrapped the cluster, you shouldn't be setting `cluster.initial_master_nodes` on the second node. You certainly shouldn't be setting it differently on the two nodes. From [the same docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html):

> WARNING: You must set `cluster.initial_master_nodes` to the same list of nodes on each node on which it is set in order to be sure that only a single cluster forms during bootstrapping and therefore to avoid the risk of data loss.

> [@jun.li](#):
>
> What should I do if I want both as Master node?

Ensure that `node.master` is not set to `false` on either node. It defaults to `true`. One of them will be elected as the master of the cluster.

> [@jun.li](#):
>
> What is the recommended setup if I only have 2 servers? 1 master or 2 masters?

There's not much difference between them.

---

<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:** [June 12, 2019, 7:19pm UTC](https://discuss.elastic.co/t/7-0-master-not-discovered-yet/181040/4 "2019-06-12T19:19:14Z")

</div>

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