简体   繁体   English

Elasticsearch节点无法形成集群

[英]Elasticsearch Nodes Unable to Form Cluster

I have three elasticsearch nodes set up within my VPN which are unable to form a cluster. 我在VPN内设置了三个无法形成集群的elasticsearch节点。 The three machines have generic names, eg abc01.company.com, that I use to ssh into them. 这三台机器具有通用名称,例如abc01.company.com,我用它们来将它们SSH到它们中。 I can retrieve the cluster status of any machine from any other using curl, curl abc01.company.com/_cluster/health?pretty=true , but each machine thinks its a single node-cluster. 我可以使用curl, curl abc01.company.com/_cluster/health?pretty=true来从任何其他计算机检索任何计算机的群集状态,但是每台计算机都将其curl abc01.company.com/_cluster/health?pretty=true单个节点群集。 I have made the following changes to the config file: 我对配置文件进行了以下更改:

cluster.name: cluster-name
node.name: node_1

discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["abc02.company.com:9200", "abc03.company.com:9200"]

network.bind_host: 0.0.0.0
network.publish_host: abc01.company.com

The config files for the other two nodes are similar, with corresponding changes made to node.name, discovery.zen.ping.unicast.hosts, and network.publish_host. 其他两个节点的配置文件相似,对node.name,discovery.zen.ping.unicast.hosts和network.publish_host进行了相应的更改。

i faced the same issue sometime back. 我有时也遇到同样的问题。 the fix is, 解决方法是

discovery.zen.ping.unicast.hosts should point to the master nodes. Discovery.zen.ping.unicast.hosts应该指向主节点。 From you question it is not clear which nodes are master, data , client etc. 从您的问题还不清楚哪个节点是主节点,数据节点,客户端等。

Lets say,abc02.company.com is your master node and remaining nodes are data nodes. 可以说,abc02.company.com是您的主节点,其余节点是数据节点。 try the following configuration in all the three nodes 在所有三个节点中尝试以下配置

discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["abc02.company.com","[::1]"]

node.master=true will set as master node
node.master=false and node.data=true will make a nodes as data node
node.client=true will make a node as client and a client code can neither be server not be data node

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

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