在配置ElasticSearch远程访问的时,编辑/etc/elasticsearch/elasticsearch.yml配置文件开启了network.host:0.0.0.0参数,保存后重启ElasticSearch服务提示如下报错
[ERROR][o.e.b.Bootstrap ] [localhost] node validation exception
[1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

解决办法
这个是因为配置了ElasticSearch可以让其他的ip地址来访问,ElasticSearch在网络中会自动组成集群,需要指定主节点
搜索包含cluster.initial_master_nodes: ["node-1", "node-2"],去掉注释,并且修改为
cluster.initial_master_nodes: ["node-1"]
重启 Elasticsearch 服务
sudo systemctl restart elasticsearch

