# Simple example of new configuration of three node cluster, since v7.x update uses new settings

**URL:** <https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922>\
**Category:** Elasticsearch\
**Created:** [October 16, 2019, 7:55pm UTC](https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922 "2019-10-16T19:55:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnitaL](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@AnitaL](https://discuss.elastic.co/u/AnitaL)\
**Post date:** [October 16, 2019, 7:55pm UTC](https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922/1 "2019-10-16T19:55:15Z")

</div>

Hi, I took the Elasticsearch Engineer 1 training this summer (ES 6.x), then completed the Engineer 2 training (ES 7.x)

Since I learned this the config settings no longer use :

```auto
discovery.zen.ping.unicast.hosts: ["server1", "server2", "server3"]
discovery.zen.minimum_master_nodes: 2

```

and instead use

```auto
discovery.seed_hosts: ["server1", "server2", "server3"]    
cluster.initial_master_nodes: ["server1"]

```

Possible to get a simple example of how servers could join a 3 node cluster in ES 7.x ?

Is the following correct?

First time a "server1" joins a 3 node cluster (server1-3), add this to elasticsearch.yml

```auto
discovery.seed_hosts: ["server1", "server2", "server3"]    
cluster.initial_master_nodes: ["server1"]

```

Then stop server1, delete this line, then restart

```auto
cluster.initial_master_nodes: ["server1"]

```

Repeat for server2 and server 3, ie first time server2 joins:

```auto
discovery.seed_hosts: ["server1", "server2", "server3"]    
cluster.initial_master_nodes: ["server2"]

```

I have been referring to [https://www.elastic.co/guide/en/elasticsearch/reference/7.2/discovery-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.2/discovery-settings.html) however would be grateful for a simple example.

---

<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:** [October 16, 2019, 8:06pm UTC](https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922/2 "2019-10-16T20:06:57Z")

</div>

Quoting [the docs on `cluster.initial_master_nodes`](https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html#initial_master_nodes):

> You should not use this setting when restarting a cluster or adding a new node to an existing cluster.

Just set `discovery.seed_hosts` and do not mention `cluster.initial_master_nodes`.

---

<div class="post-metadata">

**Author:** ![AnitaL](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@AnitaL](https://discuss.elastic.co/u/AnitaL)\
**Post date:** [October 16, 2019, 9:09pm UTC](https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922/3 "2019-10-16T21:09:21Z")

</div>

Thanks David! Indeed you are right about the docs.

I don't understand why in I have seen eg:

```auto
cluster.initial_master_nodes: ["node1"]

```

when configuring a three node cluster (it is in the ES7 webinar for exam prep) and I also have seen it in the labs when using a single node cluster for the first time, or at least that is what I understood.

---

<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:** [October 16, 2019, 9:11pm UTC](https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922/4 "2019-10-16T21:11:43Z")

</div>

> [@AnitaL](#):
>
> when using a single node cluster for the first time

Right, forming a cluster for the first time is quite different from joining a node to an existing cluster, and is exactly the situation in which you must set `cluster.initial_master_nodes`. But you must set it to the same value on every node on which it is set. From [these docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html#modules-discovery-bootstrap-cluster):

> **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.

---

<div class="post-metadata">

**Author:** ![AnitaL](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@AnitaL](https://discuss.elastic.co/u/AnitaL)\
**Post date:** [October 16, 2019, 9:22pm UTC](https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922/5 "2019-10-16T21:22:30Z")

</div>

> [@DavidTurner](#):
>
> Right, forming a cluster for the first time is quite different from joining a node to an existing cluster

Aha! Thanks, now I see they are different scenarios.

---

<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:** [October 17, 2019, 7:07am UTC](https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922/6 "2019-10-17T07:07:48Z")

</div>

I checked with the education team and confirmed that this is something covered in the Elasticsearch Engineer I course for the 7.x series but not in the 6.x course that you attended since it does not apply to 6.x.

---

<div class="post-metadata">

**Author:** ![AnitaL](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@AnitaL](https://discuss.elastic.co/u/AnitaL)\
**Post date:** [October 17, 2019, 8:00am UTC](https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922/7 "2019-10-17T08:00:27Z")

</div>

Thanks, indeed. That is why my Eng 1 lab doesn't make sense when prepping for the exam. I was hoping for a simple or updated example for my exam prep, though your answer points me to where I was getting mixed up, at least in theory 🙂

---

<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:** [November 14, 2019, 8:00am UTC](https://discuss.elastic.co/t/simple-example-of-new-configuration-of-three-node-cluster-since-v7-x-update-uses-new-settings/203922/8 "2019-11-14T08:00:34Z")

</div>

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