# Bootstrapping a new cluster failed with ES7.0

**URL:** <https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610>\
**Category:** Elasticsearch\
**Created:** [April 26, 2019, 9:37am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610 "2019-04-26T09:37:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoadingZhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loadingzhang/32/22391_2.png) [@LoadingZhang](https://discuss.elastic.co/u/LoadingZhang)\
**Post date:** [April 26, 2019, 9:37am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610/1 "2019-04-26T09:37:26Z")

</div>

I have set`discovery.seed_hosts` and `cluster.initial_master_nodes` with three master node.  
ES outputs this message in log:

```auto
[WARN][o.e.c.c.ClusterFormationFailureHelper] [c3-bigdata-es-master02.bj] master not discovered yet, thisnode has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [c3-bigdata-es-master01.bj:9301, c3-bigdata-es-master02.bj:9301, c3-bigdata-es-master03.bj:9301] to bootstrap a cluster: have discovered [{c3-bigdata-es-master01.bj}{pzf5WD4KSzeyU1j2nUycVw}{_adKfIIJQ-KuQ-bsllqxuw}{10.136.25.11}{10.136.25.11:9301}{server=c3-bigdata-es-master01.bj, xpack.installed=true}, {c3-bigdata-es-master03.bj}{PTNBlHXwTv-DiRKraJFGww}{GLHvL60-RgWoubD1hVN4rQ}{10.136.145.34}{10.136.145.34:9301}{server=c3-bigdata-es-master03.bj, xpack.installed=true}]; discovery will continue using [10.136.25.11:9301, 10.136.145.34:9301] from hosts providers and [{c3-bigdata-es-master02.bj}{lRjoe29OQKOWYF15DbLzfA}{wC1wWdzRTy--ALoKZPo1Dg}{10.136.186.33}{10.136.186.33:9301}{server=c3-bigdata-es-master02.bj, xpack.installed=true}] from last-known cluster state; node term 0, last-accepted version 0 in term0

```

Then I set logger level to TRAC , and the log just like [this](https://discuss.elastic.co/t/master-not-discovered-yet-this-node-has-not-previously-joined-a-bootstrapped-v7-cluster/176304/39) .  
I use hostname as node name, It exactly correct.

Finally, I change `discovery.seed_hosts` and `cluster.initial_master_nodes` settings to IP not hostname, it worked!

So I wondering why can not bootstrap a cluster using hostname, but IP does?

---

<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:** [April 26, 2019, 10:00am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610/2 "2019-04-26T10:00:30Z")

</div>

`cluster.initial_master_nodes` accepts node names, not hostnames, although sometimes a node name will be set to a hostname. See [this note in the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html#modules-discovery-bootstrap-cluster-fqdns) for more information.

---

<div class="post-metadata">

**Author:** ![LoadingZhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loadingzhang/32/22391_2.png) [@LoadingZhang](https://discuss.elastic.co/u/LoadingZhang)\
**Post date:** [April 26, 2019, 10:15am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610/3 "2019-04-26T10:15:12Z")

</div>

Yes, I use {HOSTNAME} as node.name. and I use real hostname as node.name not {HOSTNAME}, failed bootstrap either.

---

<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:** [April 26, 2019, 10:17am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610/4 "2019-04-26T10:17:38Z")

</div>

Right, so your node name is `c3-bigdata-es-master02.bj` but your `cluster.initial_master_nodes` is looking for a node called `c3-bigdata-es-master02.bj:9301` and they're not the same.

---

<div class="post-metadata">

**Author:** ![LoadingZhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loadingzhang/32/22391_2.png) [@LoadingZhang](https://discuss.elastic.co/u/LoadingZhang)\
**Post date:** [April 26, 2019, 10:21am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610/5 "2019-04-26T10:21:15Z")

</div>

Beacuse I add tcp port after hostname, did you mean tcp port should not add to `cluster.initial_master_nodes` ? or Using hostname can not add tcp port?

---

<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:** [April 26, 2019, 10:23am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610/6 "2019-04-26T10:23:35Z")

</div>

`cluster.initial_master_nodes` should be a list of node names. Your node names don't contain ports. Therefore `cluster.initial_master_nodes` shouldn't contain ports. See again [this note in the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html#modules-discovery-bootstrap-cluster-fqdns), which starts:

> The node names used in the `cluster.initial_master_nodes` list must exactly match the `node.name` properties of the nodes.

---

<div class="post-metadata">

**Author:** ![LoadingZhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loadingzhang/32/22391_2.png) [@LoadingZhang](https://discuss.elastic.co/u/LoadingZhang)\
**Post date:** [April 26, 2019, 10:32am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610/7 "2019-04-26T10:32:08Z")

</div>

Thanks for helping me to figure out.  
I misunderstande that tcp port can add to node name after reading this [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html#modules-discovery-bootstrap-cluster)

```auto
cluster.initial_master_nodes:
  - 10.0.10.101
  - 10.0.10.102:9300
  - 10.0.10.102:9301

```

My fault.

---

<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:** [April 26, 2019, 10:35am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610/8 "2019-04-26T10:35:40Z")

</div>

I see, yes. That only applies if you've got more than one node with the same IP address, but it does only work with IP addresses.

---

<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 24, 2019, 10:35am UTC](https://discuss.elastic.co/t/bootstrapping-a-new-cluster-failed-with-es7-0/178610/9 "2019-05-24T10:35:41Z")

</div>

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