# Not able to create a cluster with ES 5.6?

**URL:** <https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917>\
**Category:** Elasticsearch\
**Created:** [September 18, 2017, 6:51pm UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917 "2017-09-18T18:51:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [September 18, 2017, 6:51pm UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/1 "2017-09-18T18:51:48Z")

</div>

Hi Experts ,

I got 2 nodes for testing purpose and I have new installation of ES 5.6 . I am using below elasticsearch.yml on both the machines .

First node

```
cluster.name: e-2
path.logs: /opt/es/2/es_logs
bootstrap.memory_lock: true
network.host: x.x.x.70
http.port: 20021-20030
discovery.zen.ping.unicast.hosts: ["x.x.x.70","x.x.x.71"]
discovery.zen.minimum_master_nodes: 1

Second node 

 cluster.name: e-2
    path.logs: /opt/es/2/es_logs
    bootstrap.memory_lock: true
    network.host: x.x.x.71
    http.port: 20021-20030
    discovery.zen.ping.unicast.hosts: ["x.x.x.71","x.x.x.70"]
    discovery.zen.minimum_master_nodes: 1

```

Now When I start node 1 I got couple of errors and then it start node 1 as master , same as with node 2 but independent master, can someone please help me to understand why node 2 is not joining as cluster node ?

Error

```
[2017-09-18T13:57:17,445][WARN][o.e.d.z.UnicastZenPing] [P5Q_-BV] [1] failed send ping to {#zen_unicast_x.x.x.70_0#}{1MmVMCsNRPqXrhGE3faEqA}{x.x.x.70}{x.x.x.70:9300}
java.lang.IllegalStateException: handshake failed, mismatched cluster name [Cluster [e-1]] - {#zen_unicast_x.x.x.70_0#}{1MmVMCsNRPqXrhGE3faEqA}{x.x.x.70}{x.x.x.70:9300} 
at org.elasticsearch.transport.TransportService.handshake(TransportService.java:407) ~[elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.transport.TransportService.handshake(TransportService.java:370) ~[elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.discovery.zen.UnicastZenPing$PingingRound.getOrConnect(UnicastZenPing.java:400) ~[elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.discovery.zen.UnicastZenPing$3.doRun(UnicastZenPing.java:507) [elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) [elasticsearch-5.6.0.jar:5.6.0]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.0.jar:5.6.0]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_71]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_71]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_71]

```

Please help me to understand what I am missing here?

Regards  
VG

---

<div class="post-metadata">

**Author:** ![nellicus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nellicus/32/51566_2.png) [@nellicus](https://discuss.elastic.co/u/nellicus)\
**Post date:** [September 18, 2017, 7:01pm UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/2 "2017-09-18T19:01:12Z")

</div>

Hi Vikas

> java.lang.IllegalStateException: handshake failed, mismatched cluster name [Cluster [e-1]] - {#zen\_unicast\_x.x.x.70\_0#}{1MmVMCsNRPqXrhGE3faEqA}{x.x.x.70}{x.x.x.70:9300}

nodes belonging to the same cluster need to have same [cluster name](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/important-settings.html#cluster.name)

The log seems to say that one of the nodes has set `cluster.name:e-1` ?

Also

> same as with node 2 but independent master

not sure about what independent means here, each instance of ES can be configured to act as a master node (`node.master:true`); when more masters join the same cluster only one of them at any time will be the currently elected master and be the sole actor allowed to make changes to the cluster state.

I hope this helps

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [September 18, 2017, 7:07pm UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/3 "2017-09-18T19:07:22Z")

</div>

Thanks Nellicus for quick response

Actually I have another cluster on the same 2 machines that e-1 running on different ports , and that is on ES 5.5.0 . That clsuter is working fine . Not sure why this new cluster is trying to connect to that one .

Here is my Second cluster which is e-1

```
cluster.name: e-1
path.logs: /opt/es/1/es_logs
bootstrap.memory_lock: true
network.host: x.x.x.70
http.port: 20011-20020
discovery.zen.ping.unicast.hosts: ["x.x.x.71","x.x.x.70"]
discovery.zen.minimum_master_nodes: 2
```

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [September 18, 2017, 7:19pm UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/4 "2017-09-18T19:19:20Z")

</div>

Does this means I cannot run 2 different clusters on the same machines ? So my plan was to test with older and newer ES versions .

---

<div class="post-metadata">

**Author:** ![nellicus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nellicus/32/51566_2.png) [@nellicus](https://discuss.elastic.co/u/nellicus)\
**Post date:** [September 18, 2017, 7:42pm UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/5 "2017-09-18T19:42:11Z")

</div>

you _can_ have mutliple clusters on same machines, although this usually makes sense for advanced users only in some very specific scenarios like using servers with huge amount of RAM. Do you _really_ need more clusters to begin with?

Said that, seeing that exception my guess is that you're having nodes from different clusters (`e-1`,`e-2`) trying to talk between each other.

you only want nodes of cluster `e-1` to talk to other nodes of cluster `e-1` only, not `e-2`.

I suggest going through a review of your  
[transport protocol](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html#modules-transport) and [unicast](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#unicast.hosts) settings to achieve the desired behaviour.

Cheers

---

<div class="post-metadata">

**Author:** ![nellicus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nellicus/32/51566_2.png) [@nellicus](https://discuss.elastic.co/u/nellicus)\
**Post date:** [September 18, 2017, 7:47pm UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/6 "2017-09-18T19:47:01Z")

</div>

> running on different ports

> http.port: 20011-20020

ES nodes use Transport Protocol to form a cluster, not HTTP, so your nodes are probably all running on the default transport ports `9300-...`

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [September 19, 2017, 6:12am UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/7 "2017-09-19T06:12:15Z")

</div>

Thanks Nellicus,

You saved my day , your last comment resolve the problem . I need to use Transport protocol things are working now .

May I ask Another query here , since I have only 2 nodes(servers), so what would be the `discovery.zen.minimum_master_nodes` in this case . As per document i can calculate as `(number of master-eligible nodes / 2) + 1` . Right now I am mentioning it as 1. My confusion here is `number of master-eligible nodes` , is it overall nodes ? if it is then as per calculation (2/2)+1 = 2 . Please correct me if this is wrong understanding .Also does this mean I only have 1 master node in my cluster and if this goes down I will be in trouble or second node will start acting as master as I have set master: true on both the nodes .

As per my understanding 3 node cluster is recommended to avoid split brain problem ?

Cheers  
Vikas

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 19, 2017, 7:20am UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/8 "2017-09-19T07:20:57Z")

</div>

With only 2 nodes in the cluster, minimum\_master\_nodes should be set to 2 if they are both master eligible. This means that the cluster will not take writes if one of the nodes is down, which is by design in order to avoid data loss. With 3 master eligible nodes in the cluster, 2 of the bodes is sufficient for quorum/majority, so the cluster can continue operating even with one node missing.

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [September 19, 2017, 8:18am UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/9 "2017-09-19T08:18:21Z")

</div>

Perfect explanation , Thanks Christian

---

<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:** [October 17, 2017, 8:18am UTC](https://discuss.elastic.co/t/not-able-to-create-a-cluster-with-es-5-6/100917/10 "2017-10-17T08:18:22Z")

</div>

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