为什么按照网上的步骤配置了集群就是不生效?每个节点单独作为master node。
这时候不妨试一下如下方法:
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html
- Shut down all the nodes.
- Completely wipe each node by deleting the contents of their data folders.
- Configure
cluster.initial_master_nodes
as described above. - Restart all the nodes and verify that they have formed a single cluster.
简单点说就是,你需要重建你的elasticsearch数据文件夹,删除每个节点的data文件夹,然后分别重启es服务即可,这时候es就会自动组建集群了。