I'm trying to setup a cluster of 3 elastic nodes.
1 master and two data nodes.
I'm able to start all 3 of them yet they seem to setup there own cluster instead of joining together.
Node 1 (the master)
192.168.56.114
node2
192.168.56.113
node3
192.168.56.115
Below the config of each node:
cluster.name: TestCluster
node.name: node1
node.master: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.56.114
discovery.seed_hosts: ["192.168.56.113", "192.168.56.115"]
cluster.initial_master_nodes: ["192.168.56.114"]
xpack.security.enabled: false
cluster.name: TestCluster
node.name: node2
node.data: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.56.113
discovery.seed_hosts: ["192.168.56.114", "192.168.56.115"]
cluster.initial_master_nodes: ["192.168.56.114"]
xpack.security.enabled: false
cluster.name: TestCluster
node.name: node3
node.data: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.56.115
discovery.seed_hosts: ["192.168.56.113", "192.168.56.114"]
cluster.initial_master_nodes: ["192.168.56.114"]
xpack.security.enabled: false
When I run a curl +X GET "192.168.56.114:9200/_cluster/health?pretty"
{
"cluster_name" : "TestCluster",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
curl +X GET "192.168.56.113:9200/_cluster/health?pretty"
{
"cluster_name" : "TestCluster",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
Only one node is active in the cluster, this is the same if I run the curl on a different node they all seem to be setting up there own cluster with one node.
If I set the two data notes to node.master: false they still fail to join the cluster of the master node.
if I run an nmap scan I can see that 9200 is open on all 3 servers.
Is anyone able to tell me what I missed?
If you need any more info, please let me know.