我在集群中设置了两个主节点,但它只显示“弹性主节点”而不是“弹性从节点”。(第二个节点没有显示)。我如何解决它?我已经关注了elasticsearch文档,但没有任何更改!
我的主机文件设置:
sudo nano /etc/hosts
192.168.143.30 elastic-master
192.168.143.23 elastic-slave
我的配置文件:
# ---------------------------------- Cluster ------------------------------
cluster.name: elastic-a
# ------------------------------------ Node -------------------------------
node.name: elastic-master
node.master: true
node.data: true
# ---------------------------------- Network ------------------------------
network.host: 192.168.143.30
http.port: 9200
# --------------------------------- Discovery -----------------------------
discovery.seed_hosts: ["192.168.143.30","192.168.143.23"]
cluster.initial_master_nodes: ["elastic-slave", "elastic-master"]
我的第二个配置文件:
# ---------------------------------- Cluster ------------------------------
cluster.name: elastic-a
# ------------------------------------ Node -------------------------------
node.name: elastic-slave
node.master: true
node.data: true
# ---------------------------------- Network ------------------------------
network.host: 192.168.143.23
http.port: 9200
# --------------------------------- Discovery -----------------------------
discovery.seed_hosts: ["192.168.143.30","192.168.143.23"]
cluster.initial_master_nodes: ["elastic-slave", "elastic-master"]
1条答案
按热度按时间9o685dep1#
“首先停止服务(sudo service elasticsearch stop)。删除数据(sudo rm-rf/var/lib/elasticsearch/*)并重新启动服务(sudo service elasticsearch restart)。现在全部工作!!”在这里找到了答案:添加节点以进行本地集群elasticsearch[7.8]