簡體   English   中英

ElasticSearch 7.2.0-節點未在集群模式下彼此連接

[英]ElasticSearch 7.2.0 - nodes not connecting to each other in a cluster mode

我以這種方式安裝了Elsatic搜索。 單節點有效,但群集不起作用(2個節點無法建立連接)。

請缺少什么?

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-linux-x86_64.tar.gz

tar -xzf elasticsearch-7.2.0-linux-x86_64.tar.gz
cd elasticsearch-7.2.0/ 


# Set config for Elastic Search (in ./config/elasticsearch.yml)

# Master:
echo "" >> ./config/elasticsearch.yml
echo "xpack.security.enabled: true" >> ./config/elasticsearch.yml
echo "cluster.name: es-int"  >> ./config/elasticsearch.yml
echo "node.name: node-1"  >> ./config/elasticsearch.yml
echo "path.data: /tmp/elasticsearch.data"  >> ./config/elasticsearch.yml
echo "path.logs: /tmp/elasticsearch.log"  >> ./config/elasticsearch.yml
echo "network.host: 0.0.0.0"  >> ./config/elasticsearch.yml
echo 'discovery.seed_hosts: ["master-ip", "slave-ip" ]'  >> ./config/elasticsearch.yml
echo 'cluster.initial_master_nodes: ["master-ip"]'  >> ./config/elasticsearch.yml
echo "http.port: 9200"  >> ./config/elasticsearch.yml
echo "transport.host: localhost"  >> ./config/elasticsearch.yml
echo "transport.tcp.port: 9300"  >> ./config/elasticsearch.yml

# Slave:
echo "" >> ./config/elasticsearch.yml
echo "xpack.security.enabled: true" >> ./config/elasticsearch.yml
echo "cluster.name: es-int"  >> ./config/elasticsearch.yml
echo "node.name: node-2"  >> ./config/elasticsearch.yml
echo "path.data: /tmp/elasticsearch.data"  >> ./config/elasticsearch.yml
echo "path.logs: /tmp/elasticsearch.log"  >> ./config/elasticsearch.yml
echo "network.host: 0.0.0.0"  >> ./config/elasticsearch.yml
echo "http.port: 9200"  >> ./config/elasticsearch.yml
echo 'discovery.seed_hosts: ["master-ip", "slave-ip" ]'  >> ./config/elasticsearch.yml
echo 'cluster.initial_master_nodes: ["master-ip"]'  >> ./config/elasticsearch.yml
echo "transport.host: localhost"  >> ./config/elasticsearch.yml
echo "transport.tcp.port: 9300"  >> ./config/elasticsearch.yml

./bin/elasticsearch

錯誤:

[WARN ][o.e.c.c.ClusterFormationFailureHelper] [node-1] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [master-ip] to bootstrap a cluster: have discovered []; discovery will continue using [master-ip:9300, slave-ip:9300] from hosts providers and [{node-1}{Auontlf87A}{hJQJg9JD-IA}{localhost}{127.0.0.1:9300}{ml.machine_memory=8201650176, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

我認為這與此有關 您是否嘗試過將network.host ips設置為實際的主IP地址和從IP地址?

編輯 :鏈接可能根本不相關。 而是將node.master: true設置為允許將一個節點選舉為主節點。

edit2 :可能不是,因為這是默認設置。 不幸的是我很茫然

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM