Elasticsearch: Not enough master nodes discovered during pinging

I'm trying to setup a cluster with 4 Master nodes. After restarting the service, I've been getting the following error:

[2018-02-05T21:29:41,040][WARN ][o.e.d.z.ZenDiscovery ] [Elasticsearch-Master] not enough master nodes discovered during pinging (found [[Candidate{node={Elasticsearch-Master}{F_D4d7yvQJiQ0mXdkE2n_Q}{4hYjYChtS4aOVJXEZ7ue_A}, clusterStateVersion=-1}]], but needed [3]), pinging again

1st node: Master only
2nd node: Master + Data
3rd node: Master + Data
4th node: Master + Data

1st node config:

cluster.name: es-prod
node.name: Elasticsearch-Master
node.master: true
node.data: false

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

bootstrap.memory_lock: true

network.host: <private-ip_1st-node>

network.publish_host: ip-<private-ip_1st-node>.compute.internal

discovery.zen.ping.unicast.hosts: ["node1", "node2", "node3", "node4"]

discovery.zen.minimum_master_nodes: 3

gateway.recover_after_master_nodes: 3
gateway.recover_after_data_nodes: 3

action.destructive_requires_name: true

2nd node config:

cluster.name: es-prod
node.name: ${HOSTNAME}
node.master: true
node.data: true

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

bootstrap.memory_lock: true

network.host: 127.0.0.1

network.publish_host: ip-<private-ip_1st-node>.compute.internal

discovery.zen.ping.unicast.hosts: ["node1", "node2", "node3", "node4"]

discovery.zen.minimum_master_nodes: 3

gateway.recover_after_master_nodes: 3
gateway.recover_after_data_nodes: 3

action.destructive_requires_name: true

3rd node config:

cluster.name: es-prod
node.name: ${HOSTNAME}
node.master: true
node.data: true

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

bootstrap.memory_lock: true

network.host: 127.0.0.1

network.publish_host: ip-<private-ip_1st-node>.compute.internal

discovery.zen.ping.unicast.hosts: ["node1", "node2", "node3", "node4"]

discovery.zen.minimum_master_nodes: 3

gateway.recover_after_master_nodes: 3
gateway.recover_after_data_nodes: 3

action.destructive_requires_name: true

4th node config:

cluster.name: es-prod
node.name: ${HOSTNAME}
node.master: true
node.data: true

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

bootstrap.memory_lock: true

network.host: 127.0.0.1

network.publish_host: ip-<private-ip_1st-node>.compute.internal

discovery.zen.ping.unicast.hosts: ["node1", "node2", "node3", "node4"]

discovery.zen.minimum_master_nodes: 3

gateway.recover_after_master_nodes: 3
gateway.recover_after_data_nodes: 3

action.destructive_requires_name: true

You bound your nodes to localhost yet specified host names that presumably resolve to non-localhost addresses. These nodes will not be able to ping each other until you bind them to sockets reachable from each other.

Hey Jason,

Thank you so much for your suggestion. I was able to resolve this issue!!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.