Elasticsearch cluster configuration does not detect any unicast or multicast nodes

I am trying to use the excellent ansible-elasticsearch project to set up a nine-node Elasticearch cluster.

Each node works and works ... but they do not communicate with each other. Leading nodes consider that there are zero data nodes. Data nodes do not connect to master nodes.

They all have the same cluster.name . I tried with multicast support enabled ( discovery.zen.ping.multicast.enabled: true ) and disabled (the previous parameter is false and discovery.zen.ping.unicast.hosts:["host1","host2",..."host9"] ), but in any case, the nodes are not reported.

They have a network connection to each other - checked through telnet through port 9300.

Example output: $ curl host1:9200/_cluster/health {"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":"waited for [30s]"}],"type":"master_not_discovered_exception","reason":"waited for [30s]"},"status":503}

I can’t come up with more reasons why they won’t get in touch - looking for more ideas on what to try.

Edit: I finally solved this problem. The settings worked were from publish_host to "_non_loopback:ipv4_" , and unicast from discovery.zen.ping.unicast.hosts set to ["host1:9300","host2:9300","host3:9300"] - listing only selected primary nodes. I have a minimum main node counter of 2.

+5
source share
1 answer

The only reasons I can think of what might cause this behavior:

  • Connectivity Issues - Ping is not a good tool to verify that hosts can connect to each other. Use telnet and try connecting from host1 to host2 on port 9300.

  • You have elasticsearch.yml installed to bind 127.0.0.1 or the wrong host (if you are not sure, bind 0.0.0.0 to see if this solves your connection problems and then it’s important to change only the internal hosts to bind to avoid exposure elasticsearch directly on the Internet).

  • Your publish_host is invalid. This usually happens when you start ES inside the docker container, you need to make sure publish_host is set to an address that can be accessed through other hosts.

+6
source

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


All Articles