# No route to host error with new ES cluster

**URL:** <https://discuss.elastic.co/t/no-route-to-host-error-with-new-es-cluster/63636>\
**Category:** Elasticsearch\
**Created:** [October 21, 2016, 3:42pm UTC](https://discuss.elastic.co/t/no-route-to-host-error-with-new-es-cluster/63636 "2016-10-21T15:42:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jclose](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jclose](https://discuss.elastic.co/u/jclose)\
**Post date:** [October 21, 2016, 3:42pm UTC](https://discuss.elastic.co/t/no-route-to-host-error-with-new-es-cluster/63636/1 "2016-10-21T15:42:43Z")

</div>

I'm trying to spin up a new 5 node cluster, and I'm not getting anywhere.

All 5 nodes are running a version of this same config file, with the variations being in IP addresses of the other nodes and the hostname, as well as 2 nodes being only 'data' nodes.

```
cluster.name: testcluster
node.name: node1
path.data: /opt/elasticsearch/data
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: [_local_, _em1_]
network.bind_host: [_local_, _em1_]
network.publish_host: [_local_, _em1_]
discovery.zen.ping.unicast.hosts: ["10.0.1.2", "10.0.1.3", "10.0.1.4", "10.0.1.5"]
discovery.zen.minimum_master_nodes: 3
gateway.recovery_after_nodes: 3
node.master: true
node.data: true

```

The log errors I am seeing are all very similar to this (logging set to debug):

> [2016-10-21 10:14:31,563][DEBUG][transport.netty] [node1] using profile[default], worker\_count[16], port[9300-9400], bind\_host[null], publish\_host[null], compress[false], connect\_timeout[30s], connections\_per\_node[2/3/6/1/1], receive\_predictor[512kb-\>512kb]  
> [2016-10-21 10:14:31,615][DEBUG][transport.netty] [node1] binding server bootstrap to: ::1  
> [2016-10-21 10:14:31,638][DEBUG][transport.netty] [node1] Bound profile [default] to address {[::1]:9300}  
> [2016-10-21 10:14:31,640][DEBUG][transport.netty] [node1] Bound profile [default] to address {127.0.0.1:9300}  
> [2016-10-21 10:14:31,641][DEBUG][transport.netty] [node1] Bound profile [default] to address {10.0.1.1:9300}  
> [2016-10-21 10:14:31,642][DEBUG][transport.netty] [node1] Bound profile [default] to address {[fe80::250:56ff:fe01:438]:9300}  
> [2016-10-21 10:14:31,644][INFO][transport] [node1] publish\_address {10.0.1.1:9300}, bound\_addresses {[::1]:9300}, {127.0.0.1:9300}, {10.0.1.1:9300}, {[ff88::001:88ff:ff88:001]:9300}  
> [2016-10-21 10:14:31,649][INFO][discovery] [node1] testcluster/1DdD32DdDDDD-3dD4Dd52d  
> [2016-10-21 10:14:31,652][DEBUG][cluster.service] [node1] processing [initial\_join]: execute  
> [2016-10-21 10:14:31,656][DEBUG][cluster.service] [node1] processing [initial\_join]: took 3ms no change in cluster\_state  
> [2016-10-21 10:14:31,715][WARN][transport.netty] [node1] exception caught on transport layer [[id: 0xc564d8c7]], 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)

I don't quite understand why I am seeing this. Can anyone give me a clue? Occasionally I will see the other nodes try to join. So I'll see something like this:

> [2016-10-21 10:14:37,680][DEBUG][discovery.zen] [testcluster] filtered ping responses: (filter\_client[true], filter\_data[false])  
> --\> ping\_response{node [{node3}{WfGuHey-RG65D9UH5ZMZNw}{10.0.1.2}{10.0.1.2:9300}], id[489], master [null], hasJoinedOnce [false], cluster\_name[graylog]}  
> [2016-10-21 10:14:37,681][WARN][transport.netty] [testcluster] exception caught on transport layer [[id: 0x3cab43aa]], closing connection  
> java.net.NoRouteToHostException: No route to host

I have SELINUX set to Permissive. Any clue?

---

<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:** [October 22, 2016, 2:02am UTC](https://discuss.elastic.co/t/no-route-to-host-error-with-new-es-cluster/63636/2 "2016-10-22T02:02:33Z")

</div>

Can you ping and telnet the other nodes?

---

<div class="post-metadata">

**Author:** ![jclose](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jclose](https://discuss.elastic.co/u/jclose)\
**Post date:** [October 24, 2016, 12:27pm UTC](https://discuss.elastic.co/t/no-route-to-host-error-with-new-es-cluster/63636/3 "2016-10-24T12:27:08Z")

</div>

Yes. I could ping and telnet.

I simplified my config file, and took firewalld down, and that seemed to allow traffic to flow. Now I have to go backwards and see how I can turn firewalld back on and open up the right paths and ports.

---

<div class="post-metadata">

**Author:** ![jclose](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jclose](https://discuss.elastic.co/u/jclose)\
**Post date:** [October 24, 2016, 2:37pm UTC](https://discuss.elastic.co/t/no-route-to-host-error-with-new-es-cluster/63636/4 "2016-10-24T14:37:23Z")

</div>

So I will post what has allowed this to work for me.

First, I trimmed down the elasticsearch.yml file to the following:

```
cluster.name: testcluster
node.name: node1
path.data: /opt/elasticsearch/data
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: [_local_, _em1_]
node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["10.0.1.2:9300", "10.0.1.3:9300", "10.0.1.4:9300", "10.0.1.5:9300"]
discovery.zen.minimum_master_nodes: 1
gateway.recover_after_nodes: 3
gateway.expected_nodes: 4
gateway.recover_after_time: 30s

```

Then, I executed the following commands. It's important to note that I am using Linux Red Hat 7 (RHEL7), which has the firewalld service turned on. This assumes you don't want to switch to another zone in firewalld, and don't mind putting things in the public (default) zone.

> firewall-cmd --zone=public --permanent --add-port=9200-9400/tcp  
> firewall-cmd --zone=public --permanent --add-port=9200-9400/udp  
> firewall-cmd --zone=public --permanent --add-source=10.0.1.0/24  
> firewall-cmd --reload

That ensures you have all of the appropriate ports open, and ensures that the network(s) you need access to are available.

---

<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:10pm UTC](https://discuss.elastic.co/t/no-route-to-host-error-with-new-es-cluster/63636/5 "2017-07-05T22:10:12Z")

</div>


