# Two nodes, set on the same machine, can't see each other - Dev purposes

**URL:** <https://discuss.elastic.co/t/two-nodes-set-on-the-same-machine-cant-see-each-other-dev-purposes/261787>\
**Category:** Elasticsearch\
**Created:** [January 21, 2021, 1:13pm UTC](https://discuss.elastic.co/t/two-nodes-set-on-the-same-machine-cant-see-each-other-dev-purposes/261787 "2021-01-21T13:13:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mateusz\_Koper](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mateusz_koper/32/68155_2.png) [@Mateusz\_Koper](https://discuss.elastic.co/u/Mateusz_Koper)\
**Post date:** [January 21, 2021, 1:13pm UTC](https://discuss.elastic.co/t/two-nodes-set-on-the-same-machine-cant-see-each-other-dev-purposes/261787/1 "2021-01-21T13:13:44Z")

</div>

Hi,  
We have a problem in our organization. We are trying to add second node, to existing cluster, on the same machine. I know it's not a good solution, but we only do it for development purposes. The version that we are using is: 7.8  
Our problem is that we are actually able to run two nodes on the same machine, but they don't detect each other - that is, when creating a node, each is created with totally new cluster ID, and they are not interconnected with each other.  
When it comes to the configuration file, we only use the basic settings, as two nodes are running on the same machine, and there is no need to set up advanced stuff.  
The parameters that we changed, is the node name, network host, we set up paths, node.max\_local\_storage\_nodes: 2. Cluster name is the same for both nodes, and http ports are established automatically.  
Is there any step that we skip that causes the two nodes do not find each other? Do you have any ideas? Thanks in advance!

# `Cluster`

`cluster.name: uipath-test`  
`cluster.initial_master_nodes: 2`

# ``````````````` Node ````````````````

`node.name: node-2`  
`node.max_local_storage_nodes: 2`

# ````````````````Paths ``````````````````

`path.data: D:\Elasticsearch\data`  
`path.logs: D:\Elasticsearch\logs`

#``````````````````Network `````````````````  
`network.host: [..........]`  
`http.port: 9201`  
#``````````````Discovery ````````````````  
`transport.tcp.port: 9301`

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 21, 2021, 1:23pm UTC](https://discuss.elastic.co/t/two-nodes-set-on-the-same-machine-cant-see-each-other-dev-purposes/261787/2 "2021-01-21T13:23:06Z")

</div>

> [@Mateusz\_Koper](#):
>
> node.max\_local\_storage\_nodes: 2

This parameter is deprecated, don't use it, it's trappy because it requires the nodes to race against each other when starting up. Instead give each node a different value for `path.data`.

> [@Mateusz\_Koper](#):
>
> Is there any step that we skip that causes the two nodes do not find each other? Do you have any ideas? Thanks in advance!

You have not set `cluster.initial_master_nodes` correctly, it should be a list of the node names:

```auto
cluster.initial_master_nodes: ["node-1", "node-2"]

```

You'll need to fix this and delete the contents of `D:\Elasticsearch\data` to reset everything.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 21, 2021, 4:06pm UTC](https://discuss.elastic.co/t/two-nodes-set-on-the-same-machine-cant-see-each-other-dev-purposes/261787/4 "2021-01-21T16:06:17Z")

</div>

I think there'll be more helpful information in the logs.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 22, 2021, 8:31am UTC](https://discuss.elastic.co/t/two-nodes-set-on-the-same-machine-cant-see-each-other-dev-purposes/261787/6 "2021-01-22T08:31:14Z")

</div>

I think this is not the only message in the logs. This alone doesn't tell us much.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 22, 2021, 11:55am UTC](https://discuss.elastic.co/t/two-nodes-set-on-the-same-machine-cant-see-each-other-dev-purposes/261787/9 "2021-01-22T11:55:02Z")

</div>

Yes, this is slightly more useful:

> [@Mateusz\_Koper](#):
>
> `[2021-01-21T15:10:15,937][WARN][o.e.c.c.ClusterFormationFailureHelper] [node-1] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [node-1, node-2] to bootstrap a cluster: have discovered [{node-1}{iSMEBOs0QGi3lyDohk...}{ml.machine_memory=17179332608, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0`

As it says, it needs to discover nodes `node-1` and `node-2` but it's only discovered `node-1`. You've edited this message to remove details like the discovery config which is often the source of this problem -- you're making it really quite difficult to offer useful help!

---

<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:** [February 19, 2021, 11:55am UTC](https://discuss.elastic.co/t/two-nodes-set-on-the-same-machine-cant-see-each-other-dev-purposes/261787/10 "2021-02-19T11:55:03Z")

</div>

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