# Unable to setup elasticsearch cluster

**URL:** <https://discuss.elastic.co/t/unable-to-setup-elasticsearch-cluster/83544>\
**Category:** Elasticsearch\
**Created:** [April 25, 2017, 10:34am UTC](https://discuss.elastic.co/t/unable-to-setup-elasticsearch-cluster/83544 "2017-04-25T10:34:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Newbie111985](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/newbie111985/32/17561_2.png) [@Newbie111985](https://discuss.elastic.co/u/Newbie111985)\
**Post date:** [April 25, 2017, 10:34am UTC](https://discuss.elastic.co/t/unable-to-setup-elasticsearch-cluster/83544/1 "2017-04-25T10:34:32Z")

</div>

I am trying to setup elasticsearch cluster for production environment. I am using two different hosts.  
The config params on elasticsearch.yml are as follows:

node1:  
[cluster.name](http://cluster.name): my-cluster-1  
[node.name](http://node.name): node1  
network.host: hostname1  
transport.tcp.port: 9300  
http.port: 9200

discovery.zen.minimum\_master\_nodes: 2  
discovery.zen.ping.unicast.hosts: ["hostname2"]

node2:  
[cluster.name](http://cluster.name): my-cluster-1  
[node.name](http://node.name): node2  
network.host: hostname2  
transport.tcp.port: 9300  
http.port: 9200

discovery.zen.minimum\_master\_nodes: 2  
discovery.zen.ping.unicast.hosts: ["hostname1"]

When elasticsearch server is started on both nodes(node1 followed by node2), i am getting below error at node2:

[2017-04-25T03:11:00,467][INFO][o.e.d.z.ZenDiscovery] [node2] failed to send join request to master [{node1}{B8kpLtbiQEiK40iEDzWgxA}{5VtucMrhSVyEw6IshrVrjw}{hostname1}{10.248.9.42:9300}], reason [RemoteTransportException[[node1][10.248.9.42:9300][internal:discovery/zen/join]]; nested: ConnectTransportException[[node2][10.196.25.180:9300] connect\_timeout[30s]]; nested: IOException[connection timed out: hostname2/10.196.25.180:9300]; ]

I am able to telnet to 9300 from each host to the other host. Hence I am not sure what is wrong? Kindly help me.

---

<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:** [April 28, 2017, 8:22am UTC](https://discuss.elastic.co/t/unable-to-setup-elasticsearch-cluster/83544/2 "2017-04-28T08:22:48Z")

</div>

> [@Newbie111985](#):
>
> I am trying to setup elasticsearch cluster for production environment. I am using two different hosts.

That is not best practise, you should use 3 nodes.

> [@Newbie111985](#):
>
> transport.tcp.port: 9300http.port: 9200

These are defaults, there's no need to specify them.

> [@Newbie111985](#):
>
> network.host: hostname2

What does that translate to though? It should state it in the logs.

---

<div class="post-metadata">

**Author:** ![Newbie111985](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/newbie111985/32/17561_2.png) [@Newbie111985](https://discuss.elastic.co/u/Newbie111985)\
**Post date:** [April 28, 2017, 8:37am UTC](https://discuss.elastic.co/t/unable-to-setup-elasticsearch-cluster/83544/3 "2017-04-28T08:37:42Z")

</div>

This issue has been resolved. The problem was with my cloud VM. It was having 2 IP, one private and one public. When es was started, it was bound to private IP whereas the hostname specified in other `discovery.zen.ping.unicast.hosts: ["hostname2"]` was resolving to public IP. When I tried the same setup in another non-cloud host, this worked.

---

<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:** [May 26, 2017, 8:42am UTC](https://discuss.elastic.co/t/unable-to-setup-elasticsearch-cluster/83544/4 "2017-05-26T08:42:06Z")

</div>

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