/ / Elasticsearch ERRORで、ping中に発見されたマスターノードが不足しています - amazon-web-services、elasticsearch、amazon-ec2

Elasticsearch ERRORで、ping中に発見されたマスターノードが不足しています - amazon-web-services、elasticsearch、amazon-ec2

 # ======================== Elasticsearch Configuration =========================
#cluster.name: my-application
node.name: node-1
node.master: true
node.data: true
network.host: 172.31.24.193
discovery.zen.ping.unicast.hosts:["172.31.24.193","172.31.25.87","172.31.23.237"]

node-2 elasticsearch.yml設定

  # ======================== Elasticsearch Configuration =========================
#cluster.name: my-application
node.name: node-2
node.master: true
node.data: true
network.host: 172.31.25.87
discovery.zen.ping.unicast.hosts:["172.31.24.193","172.31.25.87","172.31.23.237"]

node-3 elasticsearch設定

  # ======================== Elasticsearch Configuration =========================
#cluster.name: my-application
node.name: node-3
node.master: true
node.data: true
network.host: 172.31.23.237
discovery.zen.ping.unicast.hosts:["172.31.24.193","172.31.25.87","172.31.23.237"]

エラーの説明:私は ec2-discovery プラグイン。私はAWSアクセスキーと秘密鍵とエンドポイントを弾性キーストアに渡しています。

私は最新の弾性検索を使用しています6.2。私はamazon EC2インスタンス上のすべてのノードを起動しました。私はec2の3つのインスタンスを持っています。 私はこのような3つのノードすべてにエラーを表示しています

[node-2] not enough master nodes discovered during pinging (found [[Candidate{node={node-2}{TpI8T4GBShK8CN7c2ruAXw}{DAsuqCnISsuiw6BGvqrysA}{172.31.25.87}{172.31.25.87:9300}, clusterStateVersion=-1}]], but needed [2]), pinging again

回答:

回答№1は2

最初、 ec2-discoveryを使用するには、あなたのelasticsearch.ymlにこれを置く必要があります: discovery.zen.hosts_provider: ec2 を削除します discovery.zen.ping.unicast.hosts.
チェックしてください https://www.elastic.co/guide/en/elasticsearch/plugins/current/discovery-ec2-usage.html
ec2発見の考え方は、設定ファイル内のノードIPをハードコードするのではなく、自動で「発見」することです。

次に、 あなたが提供したエラーは、ノードが互いにpingできないことを示しています。これを可能にするセキュリティグループ内のルールを設定していることを確認してください。InBoundタブで、
タイプ:すべてのTCP
ソース:セキュリティグループid(sg-xxxxxx)