Elasticsearch 3 節點叢集 (master_not_discovered_exception)

Elasticsearch 3 節點叢集 (master_not_discovered_exception)

嘆氣......已經關注這個問題了一段時間,現在正在尋找社區......

擁有一個全新的 Elasticsearch 3 節點叢集。烏布努圖 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 並啟動了該服務以確保它正常工作。顯然這是我的錯。在查看日誌時,我發現一個條目表示它加入了錯誤的叢集。我刪除了資料目錄的內容並重新啟動了服務。就是這樣。三個節點都很高興地看到對方

相關內容