I am using Elasticsearch 2.1.0 and at the startup i get this warning (which seems more like an error really):
[2015-11-27 16:33:25,460][WARN ][transport.netty ] [node-1] exception c
aught on transport layer [[id: 0x60173267, /0:0:0:0:0:0:0:1:54916 => localhost/0
:0:0:0:0:0:0:1:9300]], closing connection
java.lang.NullPointerException
at org.elasticsearch.transport.netty.MessageChannelHandler.handleExcepti
on(MessageChannelHandler.java:206)
at org.elasticsearch.transport.netty.MessageChannelHandler.handlerRespon
seError(MessageChannelHandler.java:201)
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceiv
ed(MessageChannelHandler.java:136)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(S
impleChannelUpstreamHandler.java:70)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerC
ontext.sendUpstream(DefaultChannelPipeline.java:791)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:29
6)
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessage
Received(FrameDecoder.java:462)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDeco
der.java:443)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(Fram
eDecoder.java:303)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(S
impleChannelUpstreamHandler.java:70)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCh
annelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:26
8)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:25
5)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(Abstract
NioWorker.java:108)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNi
oSelector.java:337)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioW
orker.java:89)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnabl
e.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProof
Worker.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)
I searched the internet for a fix of this error with no success. Please advise for a solution and let me know if you need additional information from me.
It doesn't work for me. Are you trying ElasticSearch 2.1.0 on Windows? Or some other OS? I ask this because i didn't have this problem on Linux but now i have to use Windows.
exception caught on transport layer [[id: 0xa281e448]], 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)
i am using ES- 2.2.1 and when i start es service , its gives above warnings (exception caught on transport layer) and it also shows message [node ] [xyudfjd] started.
But when using curl command with http://[hostname or ip]:9200 its giving "couldnt connect to host error".
and when i use curl 'localhost:9200' it shows proper ES-details.
(weird behavior )
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]
could anyone please reply with solution for above error . I did google on this error but I could not find solution
Test case :
cluster 1 master 2 replicas
rebuild one of ES instance (replica) and started seeing the error in the java client.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.