Elasticsearch cluster with 2 nodes

hi
I hope this message finds you well
I have situation where I have installed two instance of Elasticsearch setup in remote server 1 (node1) and remote server 2 (node2), and I want to connect both these node in one cluster
-configuration of first node:
cluster.name: cluster
node.name: node-2
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
discovery.seed_hosts:

  • 192.168.110.107
  • 192.168.110.120

cluster.initial_master_nodes:

  • node-1
  • node-2
    -configuration of the second node:
    cluster.name: cluster
    node.name: node-1
    path.data: /var/lib/elasticsearch
    path.logs: /var/log/elasticsearch
    network.host: 0.0.0.0
    discovery.seed_hosts:
  • 192.168.110.107
  • 192.168.110.120

cluster.initial_master_nodes:

  • node-1
  • node-2
    and the result is :
    "cluster_name" : "cluster",
    "status" : "yellow",
    "timed_out" : false,
    "number_of_nodes" : 1,
    "number_of_data_nodes" : 1,
    "active_primary_shards" : 103,
    "active_shards" : 103,
    "relocating_shards" : 0,
    "initializing_shards" : 0,
    "unassigned_shards" : 93,
    "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" : 52.55102040816326
    }

Which version of Elasticsearch have you installed? Have you modified the configuration of the nodes since you first started them?

the version that I use is 7.13 and I have changed the configuration of the nodes

I believe you will need to wipe the data path of one of the nodes and then start it again.

1 Like

thanks so much

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