# New node cannot join to the existing cluster

**URL:** https://discuss.elastic.co/t/new-node-cannot-join-to-the-existing-cluster/336720
**Category:** Elasticsearch
**Created:** [June 22, 2023, 5:57pm UTC](https://discuss.elastic.co/t/new-node-cannot-join-to-the-existing-cluster/336720 "2023-06-22T17:57:31Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![rachelyang](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@rachelyang](https://discuss.elastic.co/u/rachelyang)
#### Post date: [June 22, 2023, 5:57pm UTC](https://discuss.elastic.co/t/new-node-cannot-join-to-the-existing-cluster/336720/1 "2023-06-22T17:57:31Z")

</div>

I have two servers for elasticsearch. After I installed the elasticsearch on one server, I started the service and ran  
`/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node` to generate an environment token. Then, I installed the elasticsearch on the other server, I reconfigured the new node by running

```auto
/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token eyJ2Z***rQSJ9
This node will be reconfigured to join an existing cluster, using the enrollment token that you provided.
This operation will overwrite the existing configuration. Specifically:
  - Security auto configuration will be removed from elasticsearch.yml
  - The [certs] config directory will be removed
  - Security auto configuration related secure settings will be removed from the elasticsearch.keystore
Do you want to continue with the reconfiguration process [y/N]y

```

Then, I started the elasticsearch service on the second server.  
However, the log file give me FAILED error:

```auto
[newnode] handshake to [10.0.0.12:9300] failed
java.lang.IllegalStateException: handshake with [{10.0.0.12:9300}{Y4Snh**oQ}{10.0.0.12}{10.0.0.12:9300}{7.17.0}] failed: remote cluster name [ElasticSearch] does not match local cluster name [elasticsearch]

```

I only set up a cluster name for the first node. I did not set up any cluster name for the new node. How can I fix the cluster name issue? Thanks.

---

<div class="post-metadata">

### Author: ![rachelyang](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@rachelyang](https://discuss.elastic.co/u/rachelyang)
#### Post date: [June 22, 2023, 6:00pm UTC](https://discuss.elastic.co/t/new-node-cannot-join-to-the-existing-cluster/336720/2 "2023-06-22T18:00:00Z")

</div>

BTW, I am running on java openjdk 11.0.19 and Elasticsearch 8.8

---

<div class="post-metadata">

### Author: ![rachelyang](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@rachelyang](https://discuss.elastic.co/u/rachelyang)
#### Post date: [June 22, 2023, 6:23pm UTC](https://discuss.elastic.co/t/new-node-cannot-join-to-the-existing-cluster/336720/3 "2023-06-22T18:23:54Z")

</div>

When I checked the nodes in the existing cluster by running

```auto
curl -X GET 'http://localhost:9200/_nodes?pretty'

```

I got only one node under this cluster.

```auto
{
  "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  }

```

The new node did not join this cluster successfully.

---

<div class="post-metadata">

### Author: ![rachelyang](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@rachelyang](https://discuss.elastic.co/u/rachelyang)
#### Post date: [June 22, 2023, 7:18pm UTC](https://discuss.elastic.co/t/new-node-cannot-join-to-the-existing-cluster/336720/4 "2023-06-22T19:18:54Z")

</div>

On the first server, I got a warning message in the log.

```auto
This node is a fully-formed single-node cluster with cluster UUID [nTodc**WWA], but it is configured as if to discover other nodes and form a multi-node cluster via the [discovery.seed_hosts=[10.0.0.12:9300, 10.0.0.13:9300]] setting. Fully-formed clusters do not attempt to discover other nodes, and nodes with different cluster UUIDs cannot belong to the same cluster. The cluster UUID persists across restarts and can only be changed by deleting the contents of the node's data path(s). Remove the discovery configuration to suppress this message.

```

I want to make a multi-node cluster. How should I set up the cluster mode on the node?

---

<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: [June 22, 2023, 8:50pm UTC](https://discuss.elastic.co/t/new-node-cannot-join-to-the-existing-cluster/336720/5 "2023-06-22T20:50:31Z")

</div>

> [@rachelyang](#):
>
> I only set up a cluster name for the first node. I did not set up any cluster name for the new node. How can I fix the cluster name issue? Thanks.

Please share the `elasticsearch.yml` of both nodes.

The `cluster.name` needs to be the same in both.

---

<div class="post-metadata">

### Author: ![rachelyang](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@rachelyang](https://discuss.elastic.co/u/rachelyang)
#### Post date: [June 23, 2023, 3:28pm UTC](https://discuss.elastic.co/t/new-node-cannot-join-to-the-existing-cluster/336720/6 "2023-06-23T15:28:39Z")

</div>

Thank you for replying my question. I checked my cluster name again. I found I made a mistake which has wasted much time.. I used one uppercase letter in the name on the first server. Right now, the cluster has been set up well.

---

<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: [July 21, 2023, 3:28pm UTC](https://discuss.elastic.co/t/new-node-cannot-join-to-the-existing-cluster/336720/7 "2023-07-21T15:28:40Z")

</div>

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