# Will the remote cluster join the local cluster if they have the same name when using cross cluster search?

**URL:** <https://discuss.elastic.co/t/will-the-remote-cluster-join-the-local-cluster-if-they-have-the-same-name-when-using-cross-cluster-search/173351>\
**Category:** Elasticsearch\
**Tags:** ccs-cross-cluster-search\
**Created:** [March 21, 2019, 4:23pm UTC](https://discuss.elastic.co/t/will-the-remote-cluster-join-the-local-cluster-if-they-have-the-same-name-when-using-cross-cluster-search/173351 "2019-03-21T16:23:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iShiBin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ishibin/32/32602_2.png) [@iShiBin](https://discuss.elastic.co/u/iShiBin)\
**Post date:** [March 21, 2019, 4:23pm UTC](https://discuss.elastic.co/t/will-the-remote-cluster-join-the-local-cluster-if-they-have-the-same-name-when-using-cross-cluster-search/173351/1 "2019-03-21T16:23:29Z")

</div>

Just wondering whether there the gateway node(s) will join the local cluster if they are using the same cluster name? Because according to [https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-discovery-bootstrap-cluster.html#\_choosing\_a\_cluster\_name](https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-discovery-bootstrap-cluster.html#_choosing_a_cluster_name), it could be.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 21, 2019, 5:33pm UTC](https://discuss.elastic.co/t/will-the-remote-cluster-join-the-local-cluster-if-they-have-the-same-name-when-using-cross-cluster-search/173351/2 "2019-03-21T17:33:39Z")

</div>

It depends on how your environment is set up, but it is possible that this could happen in versions prior to 7.0 if your configuration allows it. In 7.0 we have taken extra steps to prevent this. We recommend giving them different cluster names just to be sure, and also because it will be much less confusing to have different names for your different clusters.

---

<div class="post-metadata">

**Author:** ![iShiBin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ishibin/32/32602_2.png) [@iShiBin](https://discuss.elastic.co/u/iShiBin)\
**Post date:** [March 21, 2019, 5:48pm UTC](https://discuss.elastic.co/t/will-the-remote-cluster-join-the-local-cluster-if-they-have-the-same-name-when-using-cross-cluster-search/173351/3 "2019-03-21T17:48:34Z")

</div>

My configuration is simply both clusters have the same name before I enable the cross-cluster search. So I am worrying they will join after I open the port(9300) and communication between them.

So obviously one way to avoid this is to rename one of the clusters (assuming remote cluster), do you have some guild on how to do it properly in production?

Is there another way (some configuration?) rather than renaming the cluster?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 21, 2019, 6:11pm UTC](https://discuss.elastic.co/t/will-the-remote-cluster-join-the-local-cluster-if-they-have-the-same-name-when-using-cross-cluster-search/173351/4 "2019-03-21T18:11:42Z")

</div>

> [@iShiBin](#):
>
> So obviously one way to avoid this is to rename one of the clusters (assuming remote cluster), do you have some guild on how to do it properly in production?

It is only possible to rename a cluster by [performing a full cluster restart](https://www.elastic.co/guide/en/elasticsearch/reference/current/restart-upgrade.html).

> [@iShiBin](#):
>
> Is there another way (some configuration?) rather than renaming the cluster?

You must prevent the nodes in each cluster from [discovering](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#discovery-seed-nodes) one another when attempting to elect a master. This means that you must be certain that `discovery.zen.ping.unicast.hosts` doesn't mention hosts in the other cluster, and that if you are using any discovery plugins then they also must not be able to find nodes in the other cluster.

---

<div class="post-metadata">

**Author:** ![iShiBin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ishibin/32/32602_2.png) [@iShiBin](https://discuss.elastic.co/u/iShiBin)\
**Post date:** [March 22, 2019, 5:14pm UTC](https://discuss.elastic.co/t/will-the-remote-cluster-join-the-local-cluster-if-they-have-the-same-name-when-using-cross-cluster-search/173351/5 "2019-03-22T17:14:14Z")

</div>

Thanks for your help very much.

---

<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:** [April 19, 2019, 5:14pm UTC](https://discuss.elastic.co/t/will-the-remote-cluster-join-the-local-cluster-if-they-have-the-same-name-when-using-cross-cluster-search/173351/6 "2019-04-19T17:14:14Z")

</div>

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