# NoRouteToHostException when one of the ES instance rebuild in cluster

**URL:** <https://discuss.elastic.co/t/noroutetohostexception-when-one-of-the-es-instance-rebuild-in-cluster/78590>\
**Category:** Elasticsearch\
**Created:** [March 14, 2017, 7:57pm UTC](https://discuss.elastic.co/t/noroutetohostexception-when-one-of-the-es-instance-rebuild-in-cluster/78590 "2017-03-14T19:57:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neni](https://avatars.discourse-cdn.com/v4/letter/n/a6a055/32.png) [@Neni](https://discuss.elastic.co/u/Neni)\
**Post date:** [March 14, 2017, 7:57pm UTC](https://discuss.elastic.co/t/noroutetohostexception-when-one-of-the-es-instance-rebuild-in-cluster/78590/1 "2017-03-14T19:57:40Z")

</div>

could you please reply with fix for below error

ES version 2.1

code to connect to ES  
final Settings settings = Settings.settingsBuilder().put("[cluster.name](http://cluster.name)", clusterName).put("client.transport.sniff", true).build();  
client = TransportClient.builder().settings(settings).addPlugin(DeleteByQueryPlugin.class).build();  
InetSocketTransportAddress iNetSocketTransportAddressForEsHost = new InetSocketTransportAddress(iNetAddressForEsHost, port);

Error

2017-03-13 23:09:51.793 o.e.t.netty [WARN] [Fever Pitch] exception caught on transport layer [[id: 0x8e7656a3]], closing connection  
java.net.NoRouteToHostException: No route to host  
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.7.0\_131]  
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744) ~[?:1.7.0\_131]  
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152) ~[stormjar.jar:?]  
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) [stormjar.jar:?]  
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) [stormjar.jar:?]  
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) [stormjar.jar:?]  
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) [stormjar.jar:?]  
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [stormjar.jar:?]  
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [stormjar.jar:?]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0\_131]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0\_131]  
at java.lang.Thread.run(Thread.java:745) [?:1.7.0\_131]

---

<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 14, 2017, 11:43pm UTC](https://discuss.elastic.co/t/noroutetohostexception-when-one-of-the-es-instance-rebuild-in-cluster/78590/2 "2017-03-14T23:43:42Z")

</div>

For some reason the client cannot connect to ES. No route to host is not an ES problem, but an OS one.

Can you ping the node?

---

<div class="post-metadata">

**Author:** ![Neni](https://avatars.discourse-cdn.com/v4/letter/n/a6a055/32.png) [@Neni](https://discuss.elastic.co/u/Neni)\
**Post date:** [March 15, 2017, 12:03am UTC](https://discuss.elastic.co/t/noroutetohostexception-when-one-of-the-es-instance-rebuild-in-cluster/78590/3 "2017-03-15T00:03:11Z")

</div>

Thanks for reply . Yes I can ping node. But the exception is happening continuously . ES cluster is green.

I see so many users posted this issue but I didnt find any solution.

---

<div class="post-metadata">

**Author:** ![Neni](https://avatars.discourse-cdn.com/v4/letter/n/a6a055/32.png) [@Neni](https://discuss.elastic.co/u/Neni)\
**Post date:** [March 15, 2017, 12:31pm UTC](https://discuss.elastic.co/t/noroutetohostexception-when-one-of-the-es-instance-rebuild-in-cluster/78590/4 "2017-03-15T12:31:55Z")

</div>

Thanks for reply, y  
es I'm able to ping and when I do nslookup on hostname IP address is  
resolved

---

<div class="post-metadata">

**Author:** ![Neni](https://avatars.discourse-cdn.com/v4/letter/n/a6a055/32.png) [@Neni](https://discuss.elastic.co/u/Neni)\
**Post date:** [March 16, 2017, 3:08pm UTC](https://discuss.elastic.co/t/noroutetohostexception-when-one-of-the-es-instance-rebuild-in-cluster/78590/5 "2017-03-16T15:08:03Z")

</div>

I was told that this issue will be addressed since ES 5.1 ; there is no workaround solution for other scenarios. only way is to rebuild the dependent ES client applications to re-establish with ES nodes.  
[https://github.com/elastic/elasticsearch/issues/16412#issuecomment-286603966](https://github.com/elastic/elasticsearch/issues/16412#issuecomment-286603966)

---

<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:** [April 13, 2017, 3:08pm UTC](https://discuss.elastic.co/t/noroutetohostexception-when-one-of-the-es-instance-rebuild-in-cluster/78590/6 "2017-04-13T15:08:08Z")

</div>

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