我在两台AWS ec2计算机上进行了以下配置设置。

    Machine 10.0.66.123
    ----------------------
    cluster.name: uat-es-cluster
    node.name: uat-es-1
    path.data: /var/lib/elasticsearch
    path.logs: /var/log/elasticsearch
    network.host: 10.0.66.123
    discovery.seed_hosts: ["10.0.66.106", "10.0.66.123"]
    cluster.initial_master_nodes: ["10.0.66.106", "10.0.66.123"]
    node.master: true


    Machine 10.0.66.106
    ----------------------
    cluster.name: uat-es-cluster
    node.name: uat-es-2
    path.data: /var/lib/elasticsearch
    path.logs: /var/log/elasticsearch
    network.host: 10.0.66.106
    discovery.seed_hosts: ["10.0.66.123", "10.0.66.106"]
    cluster.initial_master_nodes: ["10.0.66.106", "10.0.66.123"]
    node.master: true

我正在跟踪两个节点上的日志。

[2019-12-30T10:17:19,037] [WARN] [oeccClusterFormationFailureHelper] [uat-es-2]主节点尚未发现,该节点先前尚未加入自举(v7 +)集群,并且该节点必须发现主节点-符合资格的节点[10.0.66.106、10.0.66.123]来引导集群:已发现[{uu-es-2} {DBRJq4uZSJycu7L6vcmZHw} {9k4Ux2veQFiYZcrnHZmFtg} {10.0.66.106} {10.0.66.106:9300} {dilm} {ml。 machine_memory = 4074115072,xpack.installed = true,ml.max_open_jobs = 20}]];发现将继续使用主机提供者提供的[10.0.66.123:9300]和[{uat-es-2} {DBRJq4uZSJycu7L6vcmZHw} {9k4Ux2veQFiYZcrnHZmFtg} {10.0.66.106} {10.0.66.106:9300} {dilm} {ml.machine_memory = ,xpack.installed = true,ml.max_open_jobs = 20}]来自最近的已知群集状态;节点术语0,术语0中最后接受的版本0

最佳答案

我在ec2实例的安全组中缺少TCP的入站规则,端口9300

关于elasticsearch - 无法在EC2机器上形成Elasticsearch 7集群,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59529262/

10-10 01:40