NoRouteToHostException when one of the ES instance rebuild in cluster

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", 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]

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?

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.

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

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

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