# Running two clusters in a single node

**URL:** <https://discuss.elastic.co/t/running-two-clusters-in-a-single-node/258301>\
**Category:** Elasticsearch\
**Created:** [December 10, 2020, 3:38pm UTC](https://discuss.elastic.co/t/running-two-clusters-in-a-single-node/258301 "2020-12-10T15:38:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ondescone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ondescone/32/80609_2.png) [@Ondescone](https://discuss.elastic.co/u/Ondescone)\
**Post date:** [December 10, 2020, 3:38pm UTC](https://discuss.elastic.co/t/running-two-clusters-in-a-single-node/258301/1 "2020-12-10T15:38:11Z")

</div>

Greetings,

I'm trying to set up the Cross Cluster Replication locally in a single node. I have been using one elasticsearch/kibana instance running as a service (version 7.9.3) with default settings and everything works fine. Now for the CCR I downloaded elasticsearch/kibana as tar.gz (version 7.10.0) and executed them with the following settings (I report only configurations different from the default one):  
elasticsearch.yml

```
cluster.name: ClusterB 
http.port: 9201

```

kibana.yml

```
server.port: 5602
elasticsearch.hosts: ["http://localhost:9201"]

```

When I execute elasticsearch from the /bin directory this error is thrown  
`[WARN][o.e.d.HandshakingTransportAddressConnector] [giacomo-ondesca-1] handshake failed for [connectToRemoteMasterNode[127.0.0.1:9300]]`

Also seems that kibana tries to connect to the other elasticsearch instance (the one running as a service on port 9200).

What I'm doing wrong?

Thanks!

---

<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:** [December 11, 2020, 4:34pm UTC](https://discuss.elastic.co/t/running-two-clusters-in-a-single-node/258301/2 "2020-12-11T16:34:17Z")

</div>

You probably need to set

```auto
node.name: giacomo-ondesca-1
discovery.seed_hosts: []
cluster.initial_master_nodes: [giacomo-ondesca-1]

```

and similarly for the other node (except I recommend replacing both instances of `giacomo-ondesca-1` with something else to avoid confusion). Otherwise they'll be trying to [automatically form a single cluster](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html#_auto_bootstrapping_in_development_mode) and will be getting confused because their cluster names don't match.

Remember to remove `cluster.initial_master_nodes` after the first startup too.

---

<div class="post-metadata">

**Author:** ![Ondescone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ondescone/32/80609_2.png) [@Ondescone](https://discuss.elastic.co/u/Ondescone)\
**Post date:** [December 11, 2020, 5:31pm UTC](https://discuss.elastic.co/t/running-two-clusters-in-a-single-node/258301/3 "2020-12-11T17:31:58Z")

</div>

Hi David,  
First of all thanks a lot for your answer. After you suggestions, I succeed starting the second elasticsearch instance, but it seems that the cluster cannot find a master node:

`[WARN][o.e.c.c.ClusterFormationFailureHelper] [giacomo-ondesca-2] master not discovered or elected yet, an election requires a node with id [cM2DKHgYTq-ZZwNMkfMqFA], have discovered [{giacomo-ondesca-2}{ZIcFDn9jQg2AMMJuZ7mlmg}{FsidkdaDTo-PSrjBPb1ACQ}{127.0.0.1}{127.0.0.1:9301}{cdhilmrstw}{ml.machine_memory=8348446720, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}] which is not a quorum; discovery will continue using [] from hosts providers and [{giacomo-ondesca-2}{ZIcFDn9jQg2AMMJuZ7mlmg}{FsidkdaDTo-PSrjBPb1ACQ}{127.0.0.1}{127.0.0.1:9301}{cdhilmrstw}{ml.machine_memory=8348446720, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}] from last-known cluster state; node term 15, last-accepted version 5532 in term 15`

---

<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:** [December 11, 2020, 6:05pm UTC](https://discuss.elastic.co/t/running-two-clusters-in-a-single-node/258301/4 "2020-12-11T18:05:36Z")

</div>

This says that the node already belonged to a cluster, but the rest of the cluster is no longer present, but that's not how you described things in your original post. I guess you've tried lots of different things and now your state is all messed up. If so, probably best to start again from scratch: shut everything down, wipe all the data paths and start the nodes up again.

---

<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:** [January 8, 2021, 6:05pm UTC](https://discuss.elastic.co/t/running-two-clusters-in-a-single-node/258301/5 "2021-01-08T18:05:47Z")

</div>

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