# Create Cluster with Nodes in Different Server

**URL:** <https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977>\
**Category:** Elasticsearch\
**Created:** [February 29, 2016, 8:34am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977 "2016-02-29T08:34:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gringo](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gringo](https://discuss.elastic.co/u/gringo)\
**Post date:** [February 29, 2016, 8:34am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/1 "2016-02-29T08:34:18Z")

</div>

Is there any documentation that mention how this is done. All the webpages that I can find out there cannot work.

Is this feature still available on elasticsearch? If yes. Can someone point me to the right place?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 29, 2016, 8:37am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/2 "2016-02-29T08:37:43Z")

</div>

[https://www.elastic.co/guide/en/elasticsearch/reference/2.2/modules-discovery-zen.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.2/modules-discovery-zen.html) and [https://www.elastic.co/guide/en/elasticsearch/guide/master/\_add\_failover.html](https://www.elastic.co/guide/en/elasticsearch/guide/master/_add_failover.html) should be all you need.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 29, 2016, 8:37am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/3 "2016-02-29T08:37:56Z")

</div>

Also [https://www.elastic.co/guide/en/elasticsearch/guide/master/important-configuration-changes.html](https://www.elastic.co/guide/en/elasticsearch/guide/master/important-configuration-changes.html)

---

<div class="post-metadata">

**Author:** ![gringo](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gringo](https://discuss.elastic.co/u/gringo)\
**Post date:** [February 29, 2016, 8:45am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/4 "2016-02-29T08:45:51Z")

</div>

These are my settings on the two different server

**Server 1**  
[cluster.name](http://cluster.name): ClusterTest  
[node.name](http://node.name): node-1  
node.master: true  
network.host: 192.168.1.109

transport.tcp.port: 9300  
discovery.zen.ping.unicast.hosts: ["192.168.1.109", "192.168.1.94:9200"]

**Server 2**  
[cluster.name](http://cluster.name): ClusterTest  
[node.name](http://node.name): node-2  
node.master: true  
network.host: 192.168.1.109

transport.tcp.port: 9300  
discovery.zen.ping.unicast.hosts: ["192.168.1.109", "192.168.1.94:9200"]

---

<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:** [February 29, 2016, 8:49am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/5 "2016-02-29T08:49:42Z")

</div>

As you have 2 master eligible nodes, have you set [minimum\_master\_nodes](https://www.elastic.co/guide/en/elasticsearch/reference/2.2/modules-node.html#split-brain) to 2 in the cluster?

> [@gringo](#):
>
> discovery.zen.ping.unicast.hosts: ["192.168.1.109", "192.168.1.94:9200"]

This should connect on port 9300, not 9200 (which is for HTTP).

---

<div class="post-metadata">

**Author:** ![gringo](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gringo](https://discuss.elastic.co/u/gringo)\
**Post date:** [February 29, 2016, 8:59am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/6 "2016-02-29T08:59:36Z")

</div>

Not yet. Which server should I set the minimum\_master\_nodes to 2?

---

<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:** [February 29, 2016, 9:06am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/7 "2016-02-29T09:06:22Z")

</div>

On both servers. It is a cluster wide setting.

---

<div class="post-metadata">

**Author:** ![gringo](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gringo](https://discuss.elastic.co/u/gringo)\
**Post date:** [February 29, 2016, 9:19am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/8 "2016-02-29T09:19:38Z")

</div>

My latest configuration. Still cannot work

[cluster.name](http://cluster.name): ClusterTest  
[node.name](http://node.name): node-1  
node.master: true  
network.host: 192.168.1.109  
transport.tcp.port: 9300  
discovery.zen.ping.unicast.hosts: ["192.168.1.94", "192.168.1.109:9200"]  
discovery.zen.minimum\_master\_nodes: 2

[cluster.name](http://cluster.name): ClusterTest  
[node.name](http://node.name): node-5  
network.host: 192.168.1.94  
node.master: true  
transport.tcp.port: 9300  
discovery.zen.ping.unicast.hosts: ["192.168.1.94", "192.168.1.109:9200"]  
discovery.zen.minimum\_master\_nodes: 2

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 29, 2016, 9:29am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/9 "2016-02-29T09:29:04Z")

</div>

You should re-read Christian's previous comments.

---

<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:** [February 29, 2016, 11:44am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/10 "2016-02-29T11:44:15Z")

</div>

> [@gringo](#):
>
> discovery.zen.ping.unicast.hosts: ["192.168.1.94", "192.168.1.109:9200"]

This should specify port 9300.

---

<div class="post-metadata">

**Author:** ![gringo](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gringo](https://discuss.elastic.co/u/gringo)\
**Post date:** [March 1, 2016, 1:23am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/11 "2016-03-01T01:23:34Z")

</div>

What should I see if it is working.

Below is my latest configuration. I am hoping to see data being accessible from both servers

[cluster.name](http://cluster.name): ClusterTest  
[node.name](http://node.name): node-1  
node.master: true  
network.host: 10.0.0.52  
transport.tcp.port: 9200  
discovery.zen.ping.unicast.hosts: ["10.0.0.52", "10.0.0.53:9300"]  
discovery.zen.minimum\_master\_nodes: 2

ClusterTest:  
[node.name](http://node.name): node-5  
network.host: 10.0.0.53  
#node.master: false  
transport.tcp.port: 9200  
discovery.zen.ping.unicast.hosts: ["10.0.0.53", "10.0.0.52:9300"]  
discovery.zen.minimum\_master\_nodes: 2

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 1, 2016, 1:28am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/12 "2016-03-01T01:28:08Z")

</div>

If it works then `_cat/nodes` will list more than one.

---

<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:** [March 1, 2016, 6:41am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/13 "2016-03-01T06:41:56Z")

</div>

> [@gringo](#):
>
> transport.tcp.port: 9200

Why did you change this to 9200? This is supposed to be 9300.

---

<div class="post-metadata">

**Author:** ![gringo](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gringo](https://discuss.elastic.co/u/gringo)\
**Post date:** [March 1, 2016, 7:07am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/14 "2016-03-01T07:07:52Z")

</div>

Is this correct now?

[cluster.name](http://cluster.name): ClusterTest  
[node.name](http://node.name): node-1  
node.master: true  
network.host: 10.0.0.52  
transport.tcp.port: 9300  
discovery.zen.ping.unicast.hosts: ["10.0.0.52", "10.0.0.53:9300"]  
discovery.zen.minimum\_master\_nodes: 2

[cluster.name](http://cluster.name): ClusterTest  
[node.name](http://node.name): node-5  
network.host: 10.0.0.53  
#node.master: false  
transport.tcp.port: 9300  
discovery.zen.ping.unicast.hosts: ["10.0.0.52", "10.0.0.52:9300"]  
discovery.zen.minimum\_master\_nodes: 2

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 1, 2016, 7:15am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/15 "2016-03-01T07:15:18Z")

</div>

I wouldn't bother even declaring `transport.tcp.port`, just leave it out.

---

<div class="post-metadata">

**Author:** ![gringo](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gringo](https://discuss.elastic.co/u/gringo)\
**Post date:** [March 2, 2016, 7:11am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/16 "2016-03-02T07:11:55Z")

</div>

Do you have some working samples? Nothing online seems to work on my systems

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 2, 2016, 9:05am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/17 "2016-03-02T09:05:05Z")

</div>

With 2.X all you need is to set these;

```auto
cluster.name: 
node.name: 
network.host: 
discovery.zen.ping.unicast.hosts: [""]
discovery.zen.minimum_master_nodes: 

```

---

<div class="post-metadata">

**Author:** ![thn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thn/32/8061_2.png) [@thn](https://discuss.elastic.co/u/thn)\
**Post date:** [March 2, 2016, 7:07pm UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/18 "2016-03-02T19:07:35Z")

</div>

It looks like it's a 2-node cluster and you have discovery.zen.minimum\_master\_nodes set to 2, this means the second node, node-5, must have node.master set to true so you'll have two master+data node in the cluster. Without the second master, it won't work.

Alternatively, for testing, you can set discovery.zen.minimum\_master\_nodes to 1 for both node-1 and node-5 and as long as node-1 has node.master set to true, the cluster should go up with no problem.

---

<div class="post-metadata">

**Author:** ![gringo](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@gringo](https://discuss.elastic.co/u/gringo)\
**Post date:** [March 3, 2016, 1:51am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/19 "2016-03-03T01:51:46Z")

</div>

Still does not work.

Giving up. Concluding that multiple node across different server is supported

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 3, 2016, 4:04am UTC](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977/20 "2016-03-03T04:04:44Z")

</div>

You're right, it is supported.  
Maybe you have a firewall or something in place?

[Next page](https://discuss.elastic.co/t/create-cluster-with-nodes-in-different-server/42977.md?page=2)
