Elasticsearch 3 节点集群(master_not_discovered_exception)

Elasticsearch 3 节点集群(master_not_discovered_exception)

唉……已经做了一段时间了,现在正在关注社区……

拥有一个全新的 3 节点 Elasticsearch 集群。Ubunutu 18.04 TLS

当我这样做时我得到了这个curl -XGET 'http://localhost:9200/_cluster/health'

{"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":null}],"type":"master_not_discovered_exception","reason":null},"status":503}

这是我的 elasticsearch.yml(已清理)

# ---------------------------------- Cluster -----------------------------------
cluster.name: clustername
# ------------------------------------ Node ------------------------------------
node.name: thisnode1
network.publish_host: thisnode1
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch/data
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ---------------------------------- Network -----------------------------------
#
network.host: 0.0.0.0
#
http.port: 9200
#
# --------------------------------- Discovery ----------------------------------
#
discovery.zen.ping.unicast.hosts: ["10.0.0.2", "10.0.0.3", "10.0.0.4"]
discovery.zen.minimum_master_nodes: 2
node.master: true
node.data: true

并且日志中的错误:

[2019-07-26T14:47:09,740][WARN ][o.e.c.c.ClusterFormationFailureHelper] [thisnode1] master not discovered or elected yet, an election requires a node with id [VEAPSAP3SMqYW-OR-J_24A], have discovered [{thisnode2}{scPfMQZcS4uigjLCUtafFQ}{IBMAZFVNRQ6zOJ2w3_RP8A}{thisnode2}{10.0.0.3:9300}{ml.machine_memory=16794214400, ml.max_open_jobs=20, xpack.installed=true}, {thisnode3}{t3lePkSJRlyRVCVHvN_WQA}{oUBItui6TaC1cIkc14YiJw}{thisnode3}{10.0.0.4:9300}{ml.machine_memory=16794214400, ml.max_open_jobs=20, xpack.installed=true}] which is not a quorum; discovery will continue using [10.0.0.3:9300, 10.0.0.4:9300] from hosts providers and [{thisnode1}{TNTCGgbJSPe6iDogwAajQg}{F3yaKygbT4O6PSG8kFPbIQ}{thisnode1}{10.0.0.2:9300}{ml.machine_memory=16794214400, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 12, last-accepted version 49 in term 12

我显然缺少配置。我只是不确定是什么。

提前感谢任何指导!

答案1

为了其他人的利益...我在三台机器上都安装了 Elasticsearch,并启动了服务以确保它正常工作。显然这是我的错误。在查看日志时,我发现一个条目说它加入了错误的集群。我删除了数据目录的内容并重新启动了服务。就是这样。所有三个节点都很高兴地看到了彼此

相关内容