小编典典

Elasticsearch Cluster-没有已知的主节点,计划重试

elasticsearch

我有一台运行elasticsearch和kibana的服务器。我添加了第二个节点以形成集群,但只希望该第二个节点从主节点复制数据。

基于有关如何执行此操作的有限文档,我第二次遇到以下错误

[DEBUG][action.admin.indices.get ] [Match] no known master node, scheduling a retry

我无法确定两台服务器的最佳配置来实现这一目标,但这是我到目前为止所做的:

主节点配置:

cluster.name: elasticsearch
node.master: true
path.data: /local00/elasticsearch/
path.work: /local00/el_temp/
network.host: 0.0.0.0
http.port: 9200
script.disable_dynamic: true

节点2

cluster.name: elasticsearch
node.master: false
node.data: true
index.number_of_shards: 5
index.number_of_replicas: 1
path.data: /local00/elasticsearch/
path.work: /local00/el_temp/
network.host: 0.0.0.0
http.port: 9200
script.disable_dynamic: true

我假设我在某处缺少其他配置。任何帮助都感激不尽。


阅读 839

收藏
2020-06-22

共1个答案

小编典典

通过以下回答解决了问题:如何设置ES集群?:

节点1:

cluster.name: mycluster
node.name: "node1"
node.master: true
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node1.example.com"]

节点2:

cluster.name: mycluster
node.name: "node2"
node.master: false
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node1.example.com"]
2020-06-22