简体   繁体   English

节点未加入Elasticsearch 5.1集群中的集群

[英]Nodes not joining cluster in Elasticsearch 5.1 cluster

I want to setup a cluster with 3 nodes(1 master, 1 client and 1 data node) with Elasticsearch 5.1.1. 我想使用Elasticsearch 5.1.1设置具有3个节点(1个主节点,1个客户端和1个数据节点)的集群。 I have connected 3 windows 10 machines through a wireless network and edited the elasticsearch.yml file of each node as follows: 我已经通过无线网络连接了3台Windows 10机器,并如下编辑每个节点的elasticsearch.yml文件:

master node: 主节点:

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"]

client node: 客户节点:

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"]

data node: 数据节点:

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"]

When I try to run elasticsearch on the master node it gives the following output 当我尝试在主节点上运行elasticsearch时,它给出以下输出 在此处输入图片说明

The nodes are not joining the cluster and I tried replacing the hostnames to IPs but still the nodes aren't joining. 节点未加入集群,我尝试将主机名替换为IP,但节点仍未加入。

According to the attached logs, it seems that your elasticsearch cluster cannot resolve the host names for the machines. 根据随附的日志,您的elasticsearch集群似乎无法解析机器的主机名。

I suggest to add all of your hosts names to the hosts file so each machine would know how to resolve the host names. 我建议将所有主机名添加到hosts文件中,以便每台计算机都知道如何解析主机名。

For linux: 对于Linux:

/etc/hosts

For windows: 对于Windows:

%SystemRoot%\System32\drivers\etc\hosts

Where by default, %SystemRoot% means: C:\\Windows 默认情况下, %SystemRoot%表示: C:\\Windows

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM