# Creating a cluster of two nodes in elasticsearch 2.3.3

**URL:** <https://discuss.elastic.co/t/creating-a-cluster-of-two-nodes-in-elasticsearch-2-3-3/53782>\
**Category:** Elasticsearch\
**Created:** [June 23, 2016, 1:44pm UTC](https://discuss.elastic.co/t/creating-a-cluster-of-two-nodes-in-elasticsearch-2-3-3/53782 "2016-06-23T13:44:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahinera](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@sahinera](https://discuss.elastic.co/u/sahinera)\
**Post date:** [June 23, 2016, 1:44pm UTC](https://discuss.elastic.co/t/creating-a-cluster-of-two-nodes-in-elasticsearch-2-3-3/53782/1 "2016-06-23T13:44:33Z")

</div>

I've been attempting to create a new Elasticsearch cluster with two nodes, each on a different server and with a different IP (let's call them x.x.x.x and x.x.x.y respectively). However, I am having trouble coming up with the configurations that would help the nodes find each other and connect. What am I supposed to set as my respective bind and publish hosts? In my log files, I get this error, which I'm guessing has to do with it:

```
[2016-06-21 13:17:00,118][WARN][transport.netty] [node2] exception caught on transport layer [[id: 0x8ae6b31f]], closing connection
java.net.NoRouteToHostException: No route to host
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
    at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

```

In addition, if someone could explain what exactly bind and publish hosts are beyond what the elasticsearch website gives, that would be great.

---

<div class="post-metadata">

**Author:** ![Ulrik\_Pedersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ulrik_pedersen/32/11352_2.png) [@Ulrik\_Pedersen](https://discuss.elastic.co/u/Ulrik_Pedersen)\
**Post date:** [June 24, 2016, 8:44am UTC](https://discuss.elastic.co/t/creating-a-cluster-of-two-nodes-in-elasticsearch-2-3-3/53782/2 "2016-06-24T08:44:04Z")

</div>

Could you post a copy of each of your configuration files?

That would make it even easier to debug your problem.

---

<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:** [June 25, 2016, 11:17am UTC](https://discuss.elastic.co/t/creating-a-cluster-of-two-nodes-in-elasticsearch-2-3-3/53782/3 "2016-06-25T11:17:56Z")

</div>

> [@sahinera](#):
>
> No route to host

That implies a bad config or a networking issue, without more info it's hard to say.

---

<div class="post-metadata">

**Author:** ![sahinera](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@sahinera](https://discuss.elastic.co/u/sahinera)\
**Post date:** [June 27, 2016, 3:05pm UTC](https://discuss.elastic.co/t/creating-a-cluster-of-two-nodes-in-elasticsearch-2-3-3/53782/4 "2016-06-27T15:05:57Z")

</div>

Solved: it was a network issue. Had a firewall blocking access to ports 9200 and 9300.

---

<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:** [July 5, 2017, 10:40pm UTC](https://discuss.elastic.co/t/creating-a-cluster-of-two-nodes-in-elasticsearch-2-3-3/53782/5 "2017-07-05T22:40:10Z")

</div>


