Adding two nodes not displaying the number of nodes as 2

Hi Team,
Here is my task wherein add new node to exisiting es cluster.
Followed below steps ;;

  1. Add instance where in es_java_heap_size_gb: 20
  2. Added es and restarted .PFA text file for elasticsearch.yml
    When I run checks ::
    curl GET http://localhost:9200/_nodes/stats?pretty
    curl: (6) Could not resolve host: GET; Unknown error
    {
    "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
    },
    "cluster_name" : "test",
    "nodes" : {
    "node1" : {
    "timestamp" : 1607180640596,
    ITs not displaying another node
curl -X GET http://localhost:9200/_cat/nodes?pretty

<nodeIP> 17 8 0 0.03 0.13 0.13 dilmrt * <node1>

Tried below Option ::
Tried disabling firewall .It dint wrk

Configuration

NOTE: Elasticsearch comes with reasonable defaults for most settings.

Before you set out to tweak and tune the configuration, make sure you

understand what are you trying to accomplish and the consequences.

The primary way of configuring a node is via this file. This template lists

the most important settings you may want to configure for a production cluster.

Please consult the documentation for further information on configuration options:

https://www.elastic.co/guide/en/elasticsearch/reference/index.html

---------------------------------- Cluster -----------------------------------

Use a descriptive name for your cluster:

cluster.name: xxx

------------------------------------ Node ------------------------------------

Use a descriptive name for the node:

node.name: x.x.x

Add custom attributes to the node:

#node.attr.rack: r1

----------------------------------- Paths ------------------------------------

Path to directory where to store the data (separate multiple locations by comma):

path.data: /elasticsearch/elasticsearch
#path.data: /es_data/elasticsearch

Path to log files:

path.logs: /var/log/elasticsearch

----------------------------------- Memory -----------------------------------

Lock the memory on startup:

#bootstrap.memory_lock: true

Make sure that the heap size is set to about half the memory available

on the system and that the owner of the process is allowed to use this

limit.

Elasticsearch performs poorly when the system is swapping the memory.

---------------------------------- Network -----------------------------------

Set the bind address to a specific IP (IPv4 or IPv6):

network.host: ["0.0.0.0"]

"/etc/elasticsearch/elasticsearch.yml" 90L, 3029C

Set a custom port for HTTP:

#http.port: 9200

For more information, consult the network module documentation.

--------------------------------- Discovery ----------------------------------

Pass an initial list of hosts to perform discovery when this node is started:

The default list of hosts is ["127.0.0.1", "[::1]"]

Bootstrap the cluster using an initial set of master-eligible nodes:

cluster.initial_master_nodes: [ "xxx","xx" ]

For more information, consult the discovery and cluster formation module documentation.

---------------------------------- Gateway -----------------------------------

Block initial recovery after a full cluster restart until N nodes are started:

#gateway.recover_after_nodes: 3

For more information, consult the gateway module documentation.

---------------------------------- Various -----------------------------------

Require explicit names when deleting indices:

#action.destructive_requires_name: true
indices.memory.index_buffer_size: 20%
discovery.seed_hosts: [ "node1", "node2" ]

url -s 'localhost:9200/_cluster/health?pretty'
{
"cluster_name" : "xxx",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 1,
"active_shards" : 1,
"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

Version

"version" : {
"number" : "7.8.1",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "b5ca9c58fb664ca8bf9e4057fc229b3396bf3a89",
"build_date" : "2020-07-21T16:40:44.668009Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
Java 1.8_u241

Please format your code/logs/config using the </> button, or markdown style back ticks. It helps to make things easy to read which helps us help you :slight_smile:

    NOTE: Elasticsearch comes with reasonable defaults for most settings.
    Before you set out to tweak and tune the configuration, make sure you
    understand what are you trying to accomplish and the consequences.
    The primary way of configuring a node is via this file. This template lists
    the most important settings you may want to configure for a production cluster.
    Please consult the documentation for further information on configuration options:
    https://www.elastic.co/guide/en/elasticsearch/reference/index.html
    ---------------------------------- Cluster -----------------------------------
    Use a descriptive name for your cluster:
    cluster.name: xxx

    ------------------------------------ Node ------------------------------------
    Use a descriptive name for the node:
    node.name: x.x.x

    Add custom attributes to the node:
    #node.attr.rack: r1

    ----------------------------------- Paths ------------------------------------
    Path to directory where to store the data (separate multiple locations by comma):
    path.data: /elasticsearch/elasticsearch
    #path.data: /es_data/elasticsearch

    Path to log files:
    path.logs: /var/log/elasticsearch

    ----------------------------------- Memory -----------------------------------
    Lock the memory on startup:
    #bootstrap.memory_lock: true

    Make sure that the heap size is set to about half the memory available
    on the system and that the owner of the process is allowed to use this
    limit.
    Elasticsearch performs poorly when the system is swapping the memory.
    ---------------------------------- Network -----------------------------------
    Set the bind address to a specific IP (IPv4 or IPv6):
    network.host: ["0.0.0.0"]

    "/etc/elasticsearch/elasticsearch.yml" 90L, 3029C

    Set a custom port for HTTP:
    #http.port: 9200

    For more information, consult the network module documentation.
    --------------------------------- Discovery ----------------------------------
    Pass an initial list of hosts to perform discovery when this node is started:
    The default list of hosts is ["127.0.0.1", "[::1]"]
    Bootstrap the cluster using an initial set of master-eligible nodes:
    cluster.initial_master_nodes: [ "xxx","xx" ]

    For more information, consult the discovery and cluster formation module documentation.
    ---------------------------------- Gateway -----------------------------------
    Block initial recovery after a full cluster restart until N nodes are started:
    #gateway.recover_after_nodes: 3

    For more information, consult the gateway module documentation.
    ---------------------------------- Various -----------------------------------
    Require explicit names when deleting indices:
    #action.destructive_requires_name: true
    indices.memory.index_buffer_size: 20%
    discovery.seed_hosts: [ "node1", "node2" ]

Please pour your suggestion

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