Bootstrapping a new cluster failed with ES7.0

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

[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 .
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?

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 for more information.

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

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.

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?

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, which starts:

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

Thanks for helping me to figure out.
I misunderstande that tcp port can add to node name after reading this docs

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

My fault.

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.

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