【问题标题】:Nodes not joining cluster in Elasticsearch 5.1 cluster节点未加入 Elasticsearch 5.1 集群中的集群
【发布时间】:2016-12-13 17:42:46
【问题描述】:

我想使用 Elasticsearch 5.1.1 设置一个包含 3 个节点(1 个主节点、1 个客户端和 1 个数据节点)的集群。我已经通过无线网络连接了3台windows 10机器,并编辑了每个节点的elasticsearch.yml文件如下:

主节点:

cluster.name: searchapp

node.name: es-master-01
node.master: true
node.data: false
node.ingest: false

network.host: 192.168.1.3

discovery.zen.ping.unicast.hosts: ["es-client-01", "es-master-01",  "es-data-01"]

客户端节点:

cluster.name: searchapp

node.name: es-client-01
node.master: false
node.data: false
node.ingest: true

network.host: 192.168.1.4

discovery.zen.ping.unicast.hosts: ["es-client-01", "es-master-01",  "es-data-01"]

数据节点:

cluster.name: searchapp

node.name: es-data-01
node.master: false
node.data: true
node.ingest: false

network.host: 192.168.1.2

discovery.zen.ping.unicast.hosts: ["es-client-01", "es-master-01",  "es-data-01"]

当我尝试在主节点上运行 elasticsearch 时,它会给出以下输出

节点未加入集群,我尝试将主机名替换为 IP,但节点仍未加入。

【问题讨论】:

  • 我认为您的机器无法解析节点的主机名,您尝试nslookup 节点是否可以成功解析名称?
  • 我可以 ping 两台机器,但没有尝试 nslookup。我可以在局域网上做吗?
  • 你能ping这些名字并成功获得所需的响应吗?
  • 是的,我可以ping通
  • 在节点上运行elasticsearch时,节点在不同的集群中但同名(searchapp),不识别其他节点

标签: elasticsearch distributed-computing


【解决方案1】:

根据附加的日志,您的elasticsearch 集群似乎无法解析机器的主机名。

我建议将所有主机名添加到主机文件中,以便每台机器都知道如何解析主机名。

对于 Linux:

/etc/hosts

对于窗户:

%SystemRoot%\System32\drivers\etc\hosts

默认情况下,%SystemRoot% 表示:C:\Windows

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-03
    • 2017-02-07
    • 2014-05-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多