# Adding two nodes not displaying the number of nodes as 2

**URL:** <https://discuss.elastic.co/t/adding-two-nodes-not-displaying-the-number-of-nodes-as-2/257738>\
**Category:** Elasticsearch\
**Created:** [December 5, 2020, 3:20pm UTC](https://discuss.elastic.co/t/adding-two-nodes-not-displaying-the-number-of-nodes-as-2/257738 "2020-12-05T15:20:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shilpa\_S\_Shetty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shilpa_s_shetty/32/79171_2.png) [@Shilpa\_S\_Shetty](https://discuss.elastic.co/u/Shilpa_S_Shetty)\
**Post date:** [December 5, 2020, 3:20pm UTC](https://discuss.elastic.co/t/adding-two-nodes-not-displaying-the-number-of-nodes-as-2/257738/1 "2020-12-05T15:20:18Z")

</div>

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](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](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

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 7, 2020, 2:18am UTC](https://discuss.elastic.co/t/adding-two-nodes-not-displaying-the-number-of-nodes-as-2/257738/2 "2020-12-07T02:18:27Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Shilpa\_S\_Shetty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shilpa_s_shetty/32/79171_2.png) [@Shilpa\_S\_Shetty](https://discuss.elastic.co/u/Shilpa_S_Shetty)\
**Post date:** [December 7, 2020, 8:02am UTC](https://discuss.elastic.co/t/adding-two-nodes-not-displaying-the-number-of-nodes-as-2/257738/3 "2020-12-07T08:02:38Z")

</div>

```auto
    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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 4, 2021, 8:02am UTC](https://discuss.elastic.co/t/adding-two-nodes-not-displaying-the-number-of-nodes-as-2/257738/4 "2021-01-04T08:02:53Z")

</div>

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