# Connection refused in cluster configuration

**URL:** <https://discuss.elastic.co/t/connection-refused-in-cluster-configuration/309293>\
**Category:** Elasticsearch\
**Created:** [July 11, 2022, 7:25am UTC](https://discuss.elastic.co/t/connection-refused-in-cluster-configuration/309293 "2022-07-11T07:25:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [July 11, 2022, 7:25am UTC](https://discuss.elastic.co/t/connection-refused-in-cluster-configuration/309293/1 "2022-07-11T07:25:08Z")

</div>

I am using elasticsearch and have outgrown one server.  
Therefore, I would like to create a cluster configuration of two elasticsearch servers with the following manual.

> **[Discovery and cluster formation | Elasticsearch Guide \[8.3\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html)**

I have deployed elasticsearch on two servers, but I get connection refused.  
I do not know the cause of this problem. Please give me some advice.

- elasticsearch.yml

- mycluster.log (\<- connection refused)

- lsof

Please comment if you need any other information.

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [July 14, 2022, 9:03am UTC](https://discuss.elastic.co/t/connection-refused-in-cluster-configuration/309293/2 "2022-07-14T09:03:33Z")

</div>

I found the following article, which I hope will be of interest to you

> **[Important Elasticsearch configuration | Elasticsearch Guide \[8.3\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#CO11-1)**

Perhaps it is because `node.name` and `cluster.initial_master_nodes` do not match exactly?

However, I lined up the `cluster.initial_master_nodes` with what I specified in `node.name`, but it didn't work.

If I don't specify `node.name`, the server name is set by default.  
I removed the `node.name`.

What was also very difficult was the need to remove the old node information.  
I am sure the following article will help you with that.

> **[Bootstrapping a cluster | Elasticsearch Guide \[8.3\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html)**

If you keep getting an error after starting Elasticsearch, deleting `/var/lib/elasticsearch/nodes` and restarting it seems to work.

I was able to configure my cluster with this response, but if you have any advice, please comment.

---

<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:** [August 11, 2022, 9:03am UTC](https://discuss.elastic.co/t/connection-refused-in-cluster-configuration/309293/3 "2022-08-11T09:03:35Z")

</div>

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