Elasticsearch cluster error master not discovered yet

Today, I tried to build an Elasticsearch cluster on this machine, and encountered two problems
. The first one: I opened Elasticsearch-head after the cluster was started, and found that there was only a single node in it.
Reason: Many of my nodes are copied and pasted based on the first node. I need to delete the data folder in the root directory. After deleting it, it will do.

The second one: I started reporting errors after running multiple Elasticsearch, master not discovered yet. Baidu later discovered that it seems that the master node needs to be designated after the 7.1 version. Add
cluster.initial_master_nodes: ["node-1"]
[] in the middle is the node name in config/elasticsearch.yml under the root of each node,
and then it can run smoothly
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_42094764/article/details/112281320