# Unable to setup the elastic cluster

**URL:** <https://discuss.elastic.co/t/unable-to-setup-the-elastic-cluster/347730>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [November 22, 2023, 11:45am UTC](https://discuss.elastic.co/t/unable-to-setup-the-elastic-cluster/347730 "2023-11-22T11:45:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balajivsn](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Balajivsn](https://discuss.elastic.co/u/Balajivsn)\
**Post date:** [November 22, 2023, 11:45am UTC](https://discuss.elastic.co/t/unable-to-setup-the-elastic-cluster/347730/1 "2023-11-22T11:45:21Z")

</div>

Team, i was trying to setup a elasticsearch cluster using vm's on local machine  
i was able to setup the configuration and started the service but i couldn't able to form the cluster  
as it shows  
#curl localhost:9200/\_cat/nodes  
[root@master01 elasticsearch]# curl localhost:9200/\_cat/nodes?v  
ip heap.percent ram.percent cpu load\_1m load\_5m load\_15m node.role master name  
192.168.29.79 14 92 22 0.34 0.27 0.28 im \* master01  
[root@master01 elasticsearch]#

working with 3 nodes and here are my configs on them  
elasticsearch version : 7.6.0

Master01: 192.168.29.79  
cluster.name: my-application  
node.name: master01  
path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch  
network.host: _local_, _site_ also tried with [_local_, _site_]  
http.port: 9200  
discovery.seed\_hosts: ["192.168.29.79"]  
cluster.initial\_master\_nodes: ["master01"]  
node.master: true  
node.data: false  
node.ingest: true  
node.ml: false

node01 : 192.168.29.9

cluster.name: my-application  
node.name: node01  
path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch  
network.host: _local_, _site_ also tried with [_local_, _site_]  
http.port: 9200  
discovery.seed\_hosts: ["192.168.29.79"]  
cluster.initial\_master\_nodes: ["master01"]  
node.master: false  
node.data: true  
node.ingest: true  
node.ml: false

node02 : 192.168.29.210

cluster.name: my-application  
node.name: node02  
path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch  
network.host: _local_, _site_ also tried with [_local_, _site_]  
http.port: 9200  
discovery.seed\_hosts: ["192.168.29.79"]  
cluster.initial\_master\_nodes: ["master01"]  
node.master: false  
node.data: true  
node.ingest: true  
node.ml: false

all 3 nodes ping each other

[root@master01 elasticsearch]# ping 192.168.29.9  
PING 192.168.29.9 (192.168.29.9) 56(84) bytes of data.  
64 bytes from 192.168.29.9: icmp\_seq=1 ttl=64 time=0.429 ms

[root@master01 elasticsearch]# ping 192.168.29.210  
PING 192.168.29.210 (192.168.29.210) 56(84) bytes of data.  
64 bytes from 192.168.29.210: icmp\_seq=1 ttl=64 time=0.524 ms  
64 bytes from 192.168.29.210: icmp\_seq=2 ttl=64 time=1.39 ms

while iwas checking the log s i see that the discovery type zen but no where i setup ths option , i kept "_local_, _site_"

[2023-11-22T06:39:51,819][INFO][o.e.d.DiscoveryModule] [master01] using discovery type [zen] and seed hosts providers [settings] and no error logs i found.

also i tried to ad the discovery type to multi-node but the elastic service failing to start.

could you please help me.

---

<div class="post-metadata">

**Author:** ![VijayIQA](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@VijayIQA](https://discuss.elastic.co/u/VijayIQA)\
**Post date:** [November 22, 2023, 12:12pm UTC](https://discuss.elastic.co/t/unable-to-setup-the-elastic-cluster/347730/2 "2023-11-22T12:12:14Z")

</div>

if you're in server (es01) then discovery.seed\_hosts=es02,es03  
check other server logs as well

---

<div class="post-metadata">

**Author:** ![Balajivsn](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Balajivsn](https://discuss.elastic.co/u/Balajivsn)\
**Post date:** [November 22, 2023, 12:57pm UTC](https://discuss.elastic.co/t/unable-to-setup-the-elastic-cluster/347730/3 "2023-11-22T12:57:02Z")

</div>

> [@VijayIQA](#):
>
> discovery.seed\_hosts

Thank you Vijay for your support!

my master node is : master01 ["192.168.29.79"]  
data nodes:  
node01 ["192.168.29.9"]  
node02 ["192.168.29.210"]

service started in all the nodes but not adding to cluster.  
here i found few logs , it seems node02 and 01 are trying to connect master using the port no 9300 instead of 9200 and not enabled any security things.

[2023-11-22T05:48:03,764][WARN][o.e.c.c.ClusterFormationFailureHelper] [node02] master not discovered yet: have discovered [{node02}{7uSw1qh6T\_6\_W4LG3w95lg}{pC2r2HVkTG2o6sysfSNt6g}{192.168.29.210}{192.168.29.210:9300}{di}{xpack.installed=true}]; discovery will continue using [192.168.29.79:9300] from hosts providers and from last-known cluster state; node term 1, last-accepted version 19 in term 1

Also found the systems are tryinh to discover using "zen" i think it soppose to be _local_._site_ as i mention network host.

[2023-11-22T06:39:51,819][INFO][o.e.d.DiscoveryModule] [master01] using discovery type [zen] and seed hosts providers [settings]

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [November 22, 2023, 1:36pm UTC](https://discuss.elastic.co/t/unable-to-setup-the-elastic-cluster/347730/4 "2023-11-22T13:36:17Z")

</div>

> [@Balajivsn](#):
>
> network.host: _local_

This cannot be `_local_` as this means that the Elasticsearch service will listen only on `127.0.0.1`.

You need to change it to `_site_` or `0.0.0.0`, I would use `0.0.0.0` to make it clear that the service will bind to every ip address in the node, you can also use the ip address of the host, for example `192.168.29.79`.

Also, keep in mind that 7.6 is not supported anymore, if you want to use version 7.X you should use 7.17.

---

<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:** [December 20, 2023, 1:37pm UTC](https://discuss.elastic.co/t/unable-to-setup-the-elastic-cluster/347730/5 "2023-12-20T13:37:10Z")

</div>

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