Elastic Cloud Search Clustering

I have 2 Linux VMs (both in the same cloud processing center): Elastic1 and Elastic2 (where Elastic 2 is a clone of Elastic 1). Both have the same centos version, one cluster name and the same ES version, again - Elastic2 is a clone.

I use the service shell to automatically start them both at boot time and enter each other ip in my corresponding iptables file, so now I can successfully ping between nodes.

I thought that this would be enough so that the ES could form a cluster, but to no avail.

Both Elastic1 and Elastic2 have 1 index, each of which is called e1 and e2. Each index has 1 fragment without replicas.

I can use the head and paramedic plugin on each server. And use the curl -XGET 'http://localhost:9200/_cluster/nodes?pretty=true'same for checking the cluster name, and each server has only 1 node.

Is there anything that says why these nodes are not talking? Ive restarted the ES service and rebooted on both servers to no avail. Could cloning be a problem?

+1
source share
1 answer

In your elasticsearch.yml:

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

So, just list the IP addresses of the node with the transport port (9300 by default) under unicast hosts. Multicasting is enabled by default, but it is usually not possible in cloud environments without the use of external plugins.

Also, be sure to check your IP / security group rules! It is easy to forget.

+2

Source: https://habr.com/ru/post/1523842/


All Articles