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를 설치하고 서비스가 제대로 작동하는지 확인하기 위해 서비스를 시작했습니다. 분명히 이것은 내 실수였습니다. 로그를 살펴보던 중 잘못된 클러스터에 참여하고 있다는 항목을 발견했습니다. 데이터 디렉토리의 내용을 삭제하고 서비스를 다시 시작했습니다. 그거였다. 세 노드 모두 행복하게 서로를 보았습니다.

관련 정보