# Adding a second node to cluster

**URL:** <https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511>\
**Category:** Elasticsearch\
**Created:** [April 25, 2018, 2:24pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511 "2018-04-25T14:24:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![L33T](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@L33T](https://discuss.elastic.co/u/L33T)\
**Post date:** [April 25, 2018, 2:24pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/1 "2018-04-25T14:24:46Z")

</div>

Hi,

Recently setup elastic on a windows host but performance is being hampered as it`s only a single node. I have setup a second node but cannot get it to see the cluster. both elasticsearch.yml config`s below:

Node 1:

bootstrap.memory\_lock: false  
cluster.name: elasticsearch  
http.port: 9200  
node.data: true  
node.ingest: true  
node.master: true  
node.max\_local\_storage\_nodes: 1  
node.name: ELASTIC-NODE1  
path.data: D:\6.2.3\data  
path.logs: D:\6.2.3\logs  
transport.tcp.port: 9300  
thread\_pool.search.queue\_size: 10000  
xpack.license.self\_generated.type: basic

Node 2:

bootstrap.memory\_lock: false  
cluster.name: elasticsearch  
http.port: 9200  
node.data: true  
node.ingest: true  
node.master: true  
node.max\_local\_storage\_nodes: 1  
node.name: ELASTIC-NODE2  
path.data: C:\elasticsearch-6.2.3\data  
path.logs: C:\elasticsearch-6.2.3\logs  
transport.tcp.port: 9300  
thread\_pool.search.queue\_size: 10000

When viewing the nodes in elasticsearchHQ i can only see one node in the cluster...

Any help would be great.

Cheers,

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [April 25, 2018, 2:29pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/2 "2018-04-25T14:29:05Z")

</div>

You can't have two nodes run on the same TCP ports. Change `Node 2` to 9201/9301.

---

<div class="post-metadata">

**Author:** ![L33T](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@L33T](https://discuss.elastic.co/u/L33T)\
**Post date:** [April 25, 2018, 2:40pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/3 "2018-04-25T14:40:45Z")

</div>

they are separate machines, does that still need to be run on different ports?

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [April 25, 2018, 2:44pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/4 "2018-04-25T14:44:56Z")

</div>

Oh. The they can use the same port 🙂

But

> By default, Elasticsearch binds to loopback addresses only — e.g. 127.0.0.1 and [::1]. This is sufficient to run a single development node on a server.

> **[network.host | Elasticsearch Reference \[6.2\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/network.host.html)**

You need to set `network.host`.

---

<div class="post-metadata">

**Author:** ![L33T](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@L33T](https://discuss.elastic.co/u/L33T)\
**Post date:** [April 25, 2018, 2:51pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/5 "2018-04-25T14:51:57Z")

</div>

Added this to both hosts (alternate settings on each), restarted services, still showing 1 node ☹

network.host: x.x.x.x  
discovery.zen.ping.unicast.hosts:

- 192.168.51.88:9300
- 192.168.51.89:9300

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [April 25, 2018, 2:56pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/6 "2018-04-25T14:56:33Z")

</div>

Are the individual nodes working ok? What do you see if you go to

- [http://192.168.51.88:9200](http://192.168.51.88:9200)
- [http://192.168.51.89:9200](http://192.168.51.89:9200)

And where do you see just one node?

---

<div class="post-metadata">

**Author:** ![L33T](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@L33T](https://discuss.elastic.co/u/L33T)\
**Post date:** [April 25, 2018, 2:58pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/7 "2018-04-25T14:58:05Z")

</div>

Node1: {  
"name" : "ELASTIC-NODE1",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "ttkgUDqOREOuISCvmwR\_zg",  
"version" : {  
"number" : "6.2.3",  
"build\_hash" : "c59ff00",  
"build\_date" : "2018-03-13T10:06:29.741383Z",  
"build\_snapshot" : false,  
"lucene\_version" : "7.2.1",  
"minimum\_wire\_compatibility\_version" : "5.6.0",  
"minimum\_index\_compatibility\_version" : "5.0.0"  
},  
"tagline" : "You Know, for Search"  
}

Node2:  
{  
"name" : "ELASTIC-NODE2",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "FvhTHEhFSF-kMeVIobCFBg",  
"version" : {  
"number" : "6.2.3",  
"build\_hash" : "c59ff00",  
"build\_date" : "2018-03-13T10:06:29.741383Z",  
"build\_snapshot" : false,  
"lucene\_version" : "7.2.1",  
"minimum\_wire\_compatibility\_version" : "5.6.0",  
"minimum\_index\_compatibility\_version" : "5.0.0"  
},  
"tagline" : "You Know, for Search"  
}

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [April 25, 2018, 3:03pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/8 "2018-04-25T15:03:40Z")

</div>

Looks good... Last thing I would test is making the node names small caps.

Also, can connect with `telnet` from one machine to the other on port 9200 and 9300?

---

<div class="post-metadata">

**Author:** ![L33T](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@L33T](https://discuss.elastic.co/u/L33T)\
**Post date:** [April 25, 2018, 3:23pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/9 "2018-04-25T15:23:48Z")

</div>

after applying those values, i cannot connect via elasticsearchhq or kibana, kibana is now prompting for credentials but i havent set any?

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [April 25, 2018, 3:26pm UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/10 "2018-04-25T15:26:33Z")

</div>

You have installed x-pack or maybe the new version of ES comes with x-pack included.

[https://www.elastic.co/guide/en/x-pack/6.2/setting-up-authentication.html#bootstrap-elastic-passwords](https://www.elastic.co/guide/en/x-pack/6.2/setting-up-authentication.html#bootstrap-elastic-passwords)

Or, you have to set `xpack.license.self_generated.type: basic` on both nodes.

I haven't played too much with ES v6 yet...

---

<div class="post-metadata">

**Author:** ![L33T](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@L33T](https://discuss.elastic.co/u/L33T)\
**Post date:** [April 26, 2018, 10:04am UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/11 "2018-04-26T10:04:28Z")

</div>

Yep, i had to re-install just to get shot of the x-pack, set the configs on both to the below and all is working 🙂

bootstrap.memory\_lock: false  
cluster.name: elasticsearch  
http.port: 9200  
node.data: true  
node.ingest: true  
node.master: true  
node.max\_local\_storage\_nodes: 1  
node.name: ELASTIC-NODE1  
path.data: D:\6.2.3\data  
path.logs: D:\6.2.3\logs  
transport.tcp.port: 9300  
thread\_pool.search.queue\_size: 10000  
network.host: x.x.x.x  
discovery.zen.ping.unicast.hosts:

- x.x.x.1:9300
- x.x.x.2:9300

thanks for your help A\_B!

Cheers,

---

<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:** [May 24, 2018, 10:04am UTC](https://discuss.elastic.co/t/adding-a-second-node-to-cluster/129511/12 "2018-05-24T10:04:36Z")

</div>

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