Nodes Getting added automatically on Elasticsearch

I have setup a elasticsearch cluster on AWS.I have setup three UBUNTU instances named : elasticsearch1, elasticsearch2, elasticsearch3

I have used the Elasticsearch Cloud AWS plugin for configuration and node discovery.

It should ideally show Three nodes but when i run :

curl -XGET 'http://172.30.0.17:9200/_cluster/health?pretty=true'
I get :

{
  "cluster_name" : "LogstashCluster",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 5,
  "number_of_data_nodes" : 5,
  "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
}

The Master Node which is elasticsearch1 has created 3 nodes :

Why is this happening ?

Probably because you didn't change the cluster.name! If you want unique clusters and they are all in the same security group, you will need to change this.

1 Like

Works now , i had changed the cluster name a few times and it was causing the issue