# 2-node cluster debian

**URL:** <https://discuss.elastic.co/t/2-node-cluster-debian/248834>\
**Category:** Elasticsearch\
**Created:** [September 16, 2020, 1:17pm UTC](https://discuss.elastic.co/t/2-node-cluster-debian/248834 "2020-09-16T13:17:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [September 16, 2020, 1:17pm UTC](https://discuss.elastic.co/t/2-node-cluster-debian/248834/1 "2020-09-16T13:17:12Z")

</div>

Hello,  
I try to build 2-node cluster but it doesn't work. I have installed **bitnami-elk-7.9.1-0-linux-debian-10-x86\_64-nami.ova** , I made two nodes:  
debian-01: 192.168.11.96, and debian-02: 192.168.11.97  
configuration file elasticsearch.yml:

```auto
http.port: 9200
path.data: /opt/bitnami/elasticsearch/data
transport.tcp.port: 9300
action.destructive_requires_name: true
network.host: 192.168.11.96
network.bind_host: 0.0.0.0
network.publish_host: 192.168.11.96
cluster.name: Cluster
node.name: debian-01 //second node debian-02
discovery.zen.ping.unicast.hosts: ["192.168.11.96", "192.168.11.97"]
discovery.initial_state_timeout: 5m
gateway.recover_after_nodes: 1
gateway.expected_nodes: 1
cluster.initial_master_nodes: ["192.168.11.96", "192.168.11.97"]
node.master: true
node.data: true
node.ingest: false

```

I have tried different configurations and still don't work. Can somebody help me and correct the configuration file?

---

<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:** [September 16, 2020, 9:26pm UTC](https://discuss.elastic.co/t/2-node-cluster-debian/248834/2 "2020-09-16T21:26:23Z")

</div>

> [@zen.xen](#):
>
> I have tried different configurations and still don't work

What do you mean by that?

---

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [September 16, 2020, 10:23pm UTC](https://discuss.elastic.co/t/2-node-cluster-debian/248834/3 "2020-09-16T22:23:54Z")

</div>

I have tried something like these:

```auto
discovery.zen.ping.unicast.hosts: ["192.168.11.96", "192.168.11.97"]
or
discovery.zen.ping.unicast.hosts: ["debian-01", "debian-02"]

cluster.initial_master_nodes: ["192.168.11.96", "192.168.11.97"]
or
cluster.initial_master_nodes: 192.168.11.96, 192.168.11.97
or
cluster.initial_master_nodes: debian-01, debian-02

```

and it doesn't work.  
Anyway, maybe you have some example how to properly configure cluster, if yes share with me if you want.

---

<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:** [September 16, 2020, 10:28pm UTC](https://discuss.elastic.co/t/2-node-cluster-debian/248834/4 "2020-09-16T22:28:59Z")

</div>

> [@zen.xen](#):
>
> and it doesn't work.

Ok, but please be more explicit.  
Can you share logs?

---

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [September 18, 2020, 9:13am UTC](https://discuss.elastic.co/t/2-node-cluster-debian/248834/5 "2020-09-18T09:13:00Z")

</div>

I removed these lines from configuration file:

```
gateway.recover_after_nodes: 1
gateway.expected_nodes: 1

```

and it works like it should.

---

<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:** [October 16, 2020, 9:13am UTC](https://discuss.elastic.co/t/2-node-cluster-debian/248834/6 "2020-10-16T09:13:02Z")

</div>

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