# 3 node ES cluster on single vm

**URL:** <https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266>\
**Category:** Elasticsearch\
**Created:** [May 8, 2019, 11:00pm UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266 "2019-05-08T23:00:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)\
**Post date:** [May 8, 2019, 11:00pm UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/1 "2019-05-08T23:00:42Z")

</div>

HI

I want to setup a 3 node ES cluster on one VM. I tried to install and configure but seeing issues.

I installed ES to two different directories and configured it . But I am seeing error. My elasticsearch.yml file . Can you please help.

Node 1:

```
cluster.name: elasticsearch
node.name: node-1
path.data: ["/home/ags/Elastic/data","/data/elk/Elastic-7/data"]
path.logs: /data/elk/Elastic-7/logs
path.repo: ["/home/ags/Elastic/backup"]
network.host: 10.11.2.233
http.port: 9200
cluster.initial_master_nodes: ["master.node.com"]

```

Node2:

```
cluster.name: elasticsearch
node.name: node-2
path.data: ["/home/ags/Elastic/data1"]
path.logs: /data/elk/Elastic71/logs
path.repo: ["/home/ags/Elastic/backup"]
network.host: 10.11.2.233

node.master: false
node.data: true
node.ingest: false
cluster.remote.connect: false

http.port: 9201
cluster.initial_master_nodes: ["master.node.com"]

```

I am seeing logs in second node.

`[2019-05-08T15:28:31,271][WARN][o.e.c.c.ClusterFormationFailureHelper] [node-2] master not discovered yet: have discovered []; discovery will continue using [127.0.0.1:9300, 127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, [::1]:9300, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304] from hosts providers and [{node-2}{i_WUVwRBTB-XrtwyKSTtBQ}{sFq4o45ORBu20F5Y_dKZqQ}{10.44.10.140}{10.44.10.140:9301}{ml.machine_memory=7674531840, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0`

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 9, 2019, 2:24am UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/2 "2019-05-09T02:24:28Z")

</div>

I believe you need to configure what is described in this page: [https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html)

---

<div class="post-metadata">

**Author:** ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)\
**Post date:** [May 9, 2019, 7:28am UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/3 "2019-05-09T07:28:02Z")

</div>

I tried the same configuration mentioned in the link. But I am seeing this errors in logs.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 9, 2019, 7:51am UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/4 "2019-05-09T07:51:34Z")

</div>

Which errors now? And could you share the full log please? Properly formatted please with `</>` icon.

---

<div class="post-metadata">

**Author:** ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)\
**Post date:** [May 9, 2019, 8:03am UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/5 "2019-05-09T08:03:17Z")

</div>

I am unable to add logs here. Can I email you the logs.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 9, 2019, 8:34am UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/6 "2019-05-09T08:34:39Z")

</div>

You can add your logs on [gist.github.com](http://gist.github.com) and share the link here.

---

<div class="post-metadata">

**Author:** ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)\
**Post date:** [May 9, 2019, 8:38am UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/7 "2019-05-09T08:38:00Z")

</div>

> <https://gist.github.com/syedsfayaz/4c53a63e7127e3506b1064b58bb4cfad>

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 9, 2019, 9:26am UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/8 "2019-05-09T09:26:31Z")

</div>

What are the logs of the other server?

Could you share also the final complete configuration of both nodes?

---

<div class="post-metadata">

**Author:** ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)\
**Post date:** [May 9, 2019, 11:28pm UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/9 "2019-05-09T23:28:30Z")

</div>

Hi Dadoonet, I got it working. I added the wrong port in the elasticsearch.yml so it was not able to discover the master node.

---

<div class="post-metadata">

**Author:** ![Kaloyan\_Dimov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaloyan_dimov/32/45028_2.png) [@Kaloyan\_Dimov](https://discuss.elastic.co/u/Kaloyan_Dimov)\
**Post date:** [June 4, 2019, 7:39pm UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/10 "2019-06-04T19:39:15Z")

</div>

Would you mind showing how you got the port right ? I am having the exact same error and I am unable to make node-2 discover the master.

---

<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:** [July 2, 2019, 7:39pm UTC](https://discuss.elastic.co/t/3-node-es-cluster-on-single-vm/180266/11 "2019-07-02T19:39:15Z")

</div>

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