# Running a elasticsearch 7.9 cluster of two (or several) nodes on same (windows) machine

**URL:** <https://discuss.elastic.co/t/running-a-elasticsearch-7-9-cluster-of-two-or-several-nodes-on-same-windows-machine/253162>\
**Category:** Elasticsearch\
**Created:** [October 23, 2020, 4:34pm UTC](https://discuss.elastic.co/t/running-a-elasticsearch-7-9-cluster-of-two-or-several-nodes-on-same-windows-machine/253162 "2020-10-23T16:34:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dror](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@dror](https://discuss.elastic.co/u/dror)\
**Post date:** [October 23, 2020, 4:34pm UTC](https://discuss.elastic.co/t/running-a-elasticsearch-7-9-cluster-of-two-or-several-nodes-on-same-windows-machine/253162/1 "2020-10-23T16:34:17Z")

</div>

Hi !  
i'm trying to run a cluster of two (or several) nodes on same (windows) machine.

**Each node is pointing to the other node in the "discovery.seed\_hosts"**

node 1 configuration is (the only rows that changed from default) (Note that each):

```auto
network.host: 127.0.0.1
cluster.name: my-application
node.name: node-1
http.port: 9202
discovery.seed_hosts: ["127.0.0.1:9200"]
cluster.initial_master_nodes: ["node-1"]

```

node 2 configuration is (the only rows that changed from default):

```auto
cluster.name: my-application
node.name: node-2
network.host: 127.0.0.1
http.port: 9200
discovery.seed_hosts: ["127.0.0.1:9202"]
cluster.initial_master_nodes: ["node-1"]

```

After i start the two nodes (on the same server) and do:

**GET [http://localhost:9200/\_cluster/health](http://localhost:9200/_cluster/health)**

**i'm seeing only one node instead of two:**

```auto

{

    "cluster_name": "my-application",

    "status": "green",

    "timed_out": false,

    **"number_of_nodes": 1,**

    "number_of_data_nodes": 1,

    "active_primary_shards": 0,

    "active_shards": 0,

    "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

}

```

what am i doing wrong here ?

thanks

---

<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:** [October 24, 2020, 1:39am UTC](https://discuss.elastic.co/t/running-a-elasticsearch-7-9-cluster-of-two-or-several-nodes-on-same-windows-machine/253162/2 "2020-10-24T01:39:51Z")

</div>

Welcome!

```
discovery.seed_hosts: ["127.0.0.1:9202"]

```

Should be

```
discovery.seed_hosts: ["127.0.0.1:9302"]

```

Same for the other node 9200 should be 9300

Then in the second node, you need to change `transport.port` to `9302`.

Are you doing that just for a test? Or do you want to run that kind of configuration in production?

---

<div class="post-metadata">

**Author:** ![dror](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@dror](https://discuss.elastic.co/u/dror)\
**Post date:** [October 24, 2020, 12:55pm UTC](https://discuss.elastic.co/t/running-a-elasticsearch-7-9-cluster-of-two-or-several-nodes-on-same-windows-machine/253162/3 "2020-10-24T12:55:29Z")

</div>

thanks a lot David.

- i needed this for development machine only.
- i tried setting the discovery as suggested

```auto
discovery.seed_hosts: ["127.0.0.1:9302"]

```

however i saw from the log the node defaulted to 9301 (strangely, i didnt see anything in the documentation to explain how this value can be overridden through configuration).

instead of changing the configuration to

```auto
discovery.seed_hosts: ["127.0.0.1:9301"] 

```

i changed both configuration files to :

```auto
discovery.seed_hosts: ["127.0.0.1"] 

```

now i'm finally seeing:

```auto
{
    "cluster_name": "my-application",
    "status": "green",
    "timed_out": false,
    "number_of_nodes": 2,
    "number_of_data_nodes": 2,
    "active_primary_shards": 0,
    "active_shards": 0,
    "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
}

```

Thanks a lot for putting me on the right path !

---

<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:** [October 24, 2020, 1:12pm UTC](https://discuss.elastic.co/t/running-a-elasticsearch-7-9-cluster-of-two-or-several-nodes-on-same-windows-machine/253162/4 "2020-10-24T13:12:02Z")

</div>

> [@dror](#):
>
> i didnt see anything in the documentation to explain how this value can be overridden through configuration

I think that `transport.port` helps for that.

---

<div class="post-metadata">

**Author:** ![dror](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@dror](https://discuss.elastic.co/u/dror)\
**Post date:** [October 24, 2020, 5:56pm UTC](https://discuss.elastic.co/t/running-a-elasticsearch-7-9-cluster-of-two-or-several-nodes-on-same-windows-machine/253162/5 "2020-10-24T17:56:41Z")

</div>

Thank you David  
Much appreciated

---

<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:** [November 21, 2020, 5:56pm UTC](https://discuss.elastic.co/t/running-a-elasticsearch-7-9-cluster-of-two-or-several-nodes-on-same-windows-machine/253162/6 "2020-11-21T17:56:54Z")

</div>

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