# \[ElasticSearch 7.5\] Cluster is failed to setup

**URL:** https://discuss.elastic.co/t/elasticsearch-7-5-cluster-is-failed-to-setup/215243
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [January 16, 2020, 6:08am UTC](https://discuss.elastic.co/t/elasticsearch-7-5-cluster-is-failed-to-setup/215243 "2020-01-16T06:08:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![longfei.li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/longfei.li/32/60757_2.png) [@longfei.li](https://discuss.elastic.co/u/longfei.li)
#### Post date: [January 16, 2020, 6:08am UTC](https://discuss.elastic.co/t/elasticsearch-7-5-cluster-is-failed-to-setup/215243/1 "2020-01-16T06:08:17Z")

</div>

I am failed to create a cluster with two nodes. It seems the nodes can't see each other.  
But, when I debug and grep the transport port with 9300, it seems they can see each other.  
~# netstat -anutp|grep 9300  
tcp6 0 0 :::9300 :::\* LISTEN 1431/java  
tcp6 0 0 192.168.111.79:9300 192.168.111.50:45172 ESTABLISHED 1431/java  
tcp6 0 0 192.168.111.79:9300 192.168.111.50:45178 ESTABLISHED 1431/java  
tcp6 0 0 192.168.111.79:9300 192.168.111.50:45188 ESTABLISHED 1431/java  
tcp6 0 0 192.168.111.79:9300 192.168.111.50:45182 ESTABLISHED 1431/java

From below api, we can only see there is only one node by itself:  
~# curl localhost:9200/\_nodes/process?pretty  
{  
"\_nodes" : {  
"total" : 1,  
"successful" : 1,  
"failed" : 0  
},  
"cluster\_name" : "labcar02",  
"nodes" : {  
"MafoliosT5WtpldQffh5CQ" : {  
"name" : "node-1",  
"transport\_address" : "192.168.111.79:9300",  
"host" : "192.168.111.79",  
"ip" : "192.168.111.79",  
"version" : "7.5.1",  
"build\_flavor" : "default",  
"build\_type" : "deb",  
"build\_hash" : "3ae9ac9a93c95bd0cdc054951cf95d88e1e18d96",  
"roles" : [  
"ingest",  
"master",  
"data",  
"ml"  
],  
"attributes" : {  
"ml.machine\_memory" : "8192053248",  
"xpack.installed" : "true",  
"ml.max\_open\_jobs" : "20"  
},  
"process" : {  
"refresh\_interval\_in\_millis" : 1000,  
"id" : 1431,  
"mlockall" : false  
}  
}  
}  
}

The two nodes info:  
|- node name: node-1, node-2  
|- hostname: TC-LarCar002, bt. The dns server works normally and it's successful to resolve hostname on both nodes.  
|- IP: TC-LarCar002(192.168.111.79), bt(192.168.111.50)  
|- elasticsearch config files

> > > > > > > > The elasticsearch.yml on node-1

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

cluster.name: labcar02

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

node.name: node-1

# 

# Add custom attributes to the node:

# 

#node.attr.rack: r1

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

path.data: /var/lib/elasticsearch

# 

# Path to log files:

# 

path.logs: /var/log/elasticsearch

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

#bootstrap.memory\_lock: true

# 

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

# ---------------------------------- Network -----------------------------------

# 

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

network.host: 0.0.0.0

# 

# Set a custom port for HTTP:

# 

http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when this node is started:

discovery.seed\_hosts: ["192.168.111.50", "192.168.111.79"]

# 

# Bootstrap the cluster using an initial set of master-eligible nodes:

# 

cluster.initial\_master\_nodes: ["TC-LarCar002"]

# 

# For more information, consult the discovery and cluster formation module documentation.

# 

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
http.cors.enabled: true  
http.cors.allow-origin: "\*"

> > > > > > The elasticsearch.yml on node-2

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

cluster.name: labcar02

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

node.name: node-2

# 

# Add custom attributes to the node:

# 

#node.attr.rack: r1

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

path.data: /data/es-data

# 

# Path to log files:

# 

path.logs: /var/log/elasticsearch

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

#bootstrap.memory\_lock: true

# 

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

# ---------------------------------- Network -----------------------------------

# 

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

network.host: 0.0.0.0

# 

# Set a custom port for HTTP:

# 

#http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when this node is started:

discovery.seed\_hosts: ["192.168.111.50", "192.168.111.79"]

# 

# Bootstrap the cluster using an initial set of master-eligible nodes:

# 

cluster.initial\_master\_nodes: ["TC-LabCar002"]

# 

# For more information, consult the discovery and cluster formation module documentation.

# 

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
http.cors.enabled: true  
http.cors.allow-origin: "\*"

Could anybody please tell me why I can't see the two nodes via api:  
curl [http://localhost:9200/\_nodes/process?pretty](http://localhost:9200/_nodes/process?pretty)

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [January 20, 2020, 4:09pm UTC](https://discuss.elastic.co/t/elasticsearch-7-5-cluster-is-failed-to-setup/215243/2 "2020-01-20T16:09:43Z")

</div>

Hey,

please take your time to use proper markdown formatting for snippets and config files. markdown has excellect support, makes your snippets a million times more readable and also increases your chances of a reply because of that.

Second, you may want to share the output of some logfiles to dig deeper into the problem why a node is not joining a cluster. See [https://www.elastic.co/help](https://www.elastic.co/help)

hope this helps as a starter!

--Alex

--Alex

---

<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 17, 2020, 4:09pm UTC](https://discuss.elastic.co/t/elasticsearch-7-5-cluster-is-failed-to-setup/215243/3 "2020-02-17T16:09:47Z")

</div>

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