i am having a cluster in which i have configured master node IPs in "cluster.initial_master_nodes" (ex: cluster.initial_master_nodes:["172.12.12.2:9300","172.12.12.3:9300","172.12.12.4:9300"]) and it worked perfectly. now i am creating a new cluster with domain names(ex: cluster.initial_master_nodes:["es-m1:9300","es-m2:9300","es-m3:9300"]) configured in "cluster.initial_master_nodes". the domain names can resolve to corresponding ip of node. Cluster bootstrapped but master nodes were not discovered.
Went through documentation and found that we must give hostname for "cluster.initial_master_nodes" property.
Identify the initial master nodes by their node.name, which defaults to their hostname. Ensure that the value in cluster.initial_master_nodes matches the node.name exactly.
I would like to know how at first the IP address worked and why domain didn't work. I couldn't find any resolving related exceptions in ES. But i found connection ConnectTransportException(address [127.0.0.1:9300], node [null], requesting [false] connection failed). I don't know what went wrong here. Whether the node name a.k.a hostname must be able to resolve to respective master nodes IP?
cluster.initial_master_nodes is about node names, it's unrelated to anything to do with networking and there is no DNS lookup happening here (except that node.name defaults to the host name in the first place)
If so, Any idea on how cluster got bootstrapped when i gave master node IPs in "cluster.initial_master_nodes " like cluster.initial_master_nodes:["172.12.12.2:9300","172.12.12.3:9300","172.12.12.4:9300"] at first?
I don't know, sorry. This code hasn't really changed in 6+ years and I won't have time to dig through it in the foreseeable future. Best to stick with the guidance in the manual, even if sometimes a different approach might appear to work for you.
FYI, Found from cluster bootstrap documentation that we can provide IP:PORT as value for cluster.initial_master_nodes( Link ). The same info is not mentioned in the documentation of cluster.initial_master_nodes.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.