【问题标题】:failed to send join request to master elastic search 5.4 cluster未能向主弹性搜索 5.4 集群发送加入请求
【发布时间】:2018-08-04 00:25:39
【问题描述】:

我已经配置了 3 个节点的弹性搜索我的集群找不到主节点

弹性搜索日志

[2018-02-24T02:39:39,106][INFO ][o.e.d.z.ZenDiscovery     ] [node3] failed to send join request to master [{node1}{MO28S_KZQaih1pd-ERrvIA}{SBwZDgFcTz2xTLOyh2fZAA}{192.168.2.xxx}{192.168.2.xxx:9300}], reason [RemoteTransportException[[node1][192.168.2.xxx:9300][internal:discovery/zen/join]]; nested: NotMasterException[Node [{node1}{MO28S_KZQaih1pd-ERrvIA}{SBwZDgFcTz2xTLOyh2fZAA}{192.168.2.xxx}{192.168.2.xxx:9300}] not master for join request]; ], tried [3] times
[2018-02-24T02:39:42,332][INFO ][o.e.d.z.ZenDiscovery     ] [node3] failed to send join request to master [{node1}{MO28S_KZQaih1pd-ERrvIA}{SBwZDgFcTz2xTLOyh2fZAA}{192.168.2.xxx}{192.168.2.xxx:9300}], reason [RemoteTransportException[[node1][192.168.2.xxx:9300][internal:discovery/zen/join]]; nested: NotMasterException[Node [{node1}{MO28S_KZQaih1pd-ERrvIA}{SBwZDgFcTz2xTLOyh2fZAA}{192.168.2.xxx}{192.168.2.xxx:9300}] not master for join request]; ], tried [3] times

我的 elasticsearch.yml 文件

cluster.name: cluster-testing 
node.name: node3
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.2.xxx
http.port: 9200
discovery.zen.ping.unicast.hosts: ["192.168.2.xxx", "192.168.2.xxx", 
                                    "192.168.2.xxx"]
discovery.zen.minimum_master_nodes: 2 
gateway.recover_after_nodes: 2 
gateway.expected_nodes: 3

我找不到问题出在哪里

【问题讨论】:

    标签: elasticsearch search elasticsearch-plugin elasticsearch-5 kibana-5


    【解决方案1】:

    我遇到了类似的错误,但我的情况有点不同。

    我试图在同一台机器上启动 2 个 ES 节点。我已经复制了我的 ES 目录来启动一个新节点,我得到了 RemoteTransportException 这个异常。

    谷歌搜索了一下后,我发现我必须删除复制目录中的nodes 目录才能启动该节点。该目录通常存在于{ES_HOME}/data/nodes/var/lib/elasticsearch/nodes

    来源:https://github.com/elastic/elasticsearch/issues/21405

    【讨论】:

    • 我遇到了类似的问题,删除数据节点服务器上的节点文件夹对我有用。我的错误消息是报告“无法向 master 发送加入请求”...“找到现有节点 {x}... 具有相同的 id 但是不同的节点实例”
    【解决方案2】:

    要将节点变成主节点,您需要添加

    node.master: true
    

    进入 elasticsearch.yml。

    根据您的配置

    discovery.zen.minimum_master_nodes: 2 
    

    至少有两个节点必须将 node.master 设置为 true

    编辑:

    您可以找到我们项目的以下工作配置(3*masters 和 6*slaves):

    大师:

    cluster.name: VAL_elasticsearch
    node.name: MASTER-${HOSTNAME}
    node.data: false
    node.master: true
    path.data: /data
    path.logs: /local/opt/logs
    path.repo: ["/home/data_ElasticSearchBackup"]
    bootstrap.memory_lock: true
    bootstrap.seccomp: false
    network.host: 0.0.0.0
    http.port: 9200
    transport.tcp.port: 9300
    discovery.zen.ping.unicast.hosts: ["ip_master1","ip_master2","ip_masterx"]
    discovery.zen.minimum_master_nodes: 2
    

    奴隶:

    cluster.name: VAL_elasticsearch
    node.name: DATA-${HOSTNAME}
    node.data: true
    node.master: false
    path.data: /data
    path.logs: /local/opt/logs
    path.repo: ["/home/data_ElasticSearchBackup"]
    bootstrap.memory_lock: true
    bootstrap.seccomp: false
    network.host: 0.0.0.0
    http.port: 9200
    transport.tcp.port: 9300
    discovery.zen.ping.unicast.hosts: ["ip_master1","ip_master2","ip_masterx"]
    discovery.zen.minimum_master_nodes: 2
    

    您确定所有弹性实例之间的所有端口都打开了吗?

    【讨论】:

    • 可以分享3个节点的配置吗?
    • 3个节点相同配置 3个节点相同日志
    • 这是否是个问题,我不知道究竟是不是我在一个有 3 台 ubuntu 机器的虚拟机上运行
    • 你能从你所有的虚拟机ping/telnet/nc你的实例吗?
    • Thamks 是的,Mumrah iam 能够 ping,现在我修复了它,现在它工作正常。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-20
    • 1970-01-01
    • 2017-12-14
    • 2022-09-29
    • 1970-01-01
    相关资源
    最近更新 更多