Elasticsearch warning at startup (exception caught on transport layer)


(Razvan Dani) #1

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.


(David Pilato) #2

Most likely https://github.com/elastic/elasticsearch/issues/14400


(Razvan Dani) #3

Sorry but that is not the case, because i have a single node so there cannot be any node version compatibility issue.

Perhaps if you could just attach a working elasticsearch.yml that i can try for elasticsearch 2.1.0.


(David Pilato) #4

Yes. Sure. Here is a working elasticsearch.yml file:

^^^ As you can see it's empty. And works well for me.


(Razvan Dani) #5

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.


(David Pilato) #6

What does not work? I'm sorry but if you need help you need to give more details about "what is not working".


(Razvan Dani) #7

I described at the beginning of the post the error (hidden as a warning) that i am getting. It starts like this:

[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)


(David Pilato) #8

So you have an empty elasticsearch.yml file?
And what gives curl localhost:9200?


(Razvan Dani) #9

Yes, i am using an empty elasticsearch.yml. And curl gives this:

{
"name" : "The Amazing Tanwir Ahmed",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.1.0",
"build_hash" : "72cd1f1a3eee09505e036106146dc1949dc5dc87",
"build_timestamp" : "2015-11-18T22:40:03Z",
"build_snapshot" : false,
"lucene_version" : "5.3.1"
},
"tagline" : "You Know, for Search"
}


(David Pilato) #10

So everything is fine.
What is not working?


(mv) #11

hey did u find a solution for this

I am facing the same problem


(Vighnesh Khalanth) #12

is it due to version in-compatibility of 2.x and using 1.x jars in the code.?
Even I'm facing the same problem after upgrading


(R01K) #13

Hi ,

I'm getting the same exception with elasticsearch-2.2.0. Is there any fix for this?

Thanks,
Rohan


(Carlos Vega Moreno) #14

Same here

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)


(R01K) #15

Hello team ,

Is there any solution for this?

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 :frowning: )

can you please help here to fix this?

Thanks,
Rohan


(Elvar) #16

Make sure you have this line in your elasticsearch.yml file

network.host: 192.168.1.1,localhost,hostname

This is the setting that tells the service to bind to an ip address, if it doesnt it binds to 127.0.0.1

Also this warning can come up when you have 3 nodes in a cluster and require minimum 2 master nodes but only 1 is available.


#17

could you please reply with fix for below error

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]


#18

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.


(system) #19