云中的弹性搜索聚类 [英] Elastic Search Clustering in the Cloud

查看:93
本文介绍了云中的弹性搜索聚类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个Linux虚拟机(在云提供商的同一数据中心):Elastic1和Elastic2(其中弹性2是弹性1的克隆)。两者具有相同的版本中心,相同的集群名称和相同的版本ES,Elastic2是一个克隆。



我使用服务包装器在启动时自动启动它们,并将其他ip引入到各自的iptables文件,所以现在我可以在节点之间ping成功。 p>

我认为这足以让ES形成集群,但无济于事。



Elastic1和Elastic2有1个索引,分别命名为e1和e2。每个索引都有1个碎片,没有复制。



我可以在每个服务器上成功使用头部和护理人员插件。并使用 curl -XGET'http:// localhost:9200 / _cluster / nodes?pretty = true'验证集群名称是否相同,每个服务器只有1个节点上市。



有什么突出的,为什么这些节点不说话? Ive重新启动了ES服务,并在两台服务器上重新启动无效。可以克隆是问题吗?

解决方案

在你的elasticsearch.yml中:

  discovery.zen.ping.multicast.enabled:false 
discovery.zen.ping.unicast.hosts:['host1:9300','host2:9300']

因此,只需在单播主机下列出您的节点IP与传输端口(默认为9300)。组播默认启用,但通常在云环境下无法使用外部插件。



另外,请确保检查您的IP规则/安全组!这很容易忘记。


I have 2 Linux VM's (both at same datacenter of Cloud Provider): Elastic1 and Elastic2 (where Elastic 2 is a clone of Elastic 1). Both have same version centos, same cluster name, and same version ES, again - Elastic2 is a clone.

I use the service wrapper to automatically start them both at boot, and introduced each others ip to their respective iptables file, so now I can successfully ping between nodes.

I thought this would be enough to allow ES to form a cluster, but to no avail.

Both Elastic1 and Elastic2 have 1 index each named e1 and e2 respectfully. Each index has 1 shard with no replicas.

I can use the head and paramedic plugins on each server successfully. And use curl -XGET 'http://localhost:9200/_cluster/nodes?pretty=true' to validate the cluster name is the same and each server only has 1 node listed.

Is there anything glaring out at why these nodes arent talking? Ive restarted the ES service and rebooted on both servers to no avail. Could cloning be the problem??

解决方案

In your elasticsearch.yml:

discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ['host1:9300', 'host2:9300']

So, just list your node IPs with the transport port (default is 9300) under unicast hosts. Multicast is enabled by default, but is generally impossible on cloud environments without use of external plugins.

Also, make sure to check your IP rules / security groups! That's easy to forget.

这篇关于云中的弹性搜索聚类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆