# Elasticsearch warning at startup (exception caught on transport layer)

**URL:** <https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768>\
**Category:** Elasticsearch\
**Created:** [November 27, 2015, 2:35pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768 "2015-11-27T14:35:37Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![razvan.dani](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@razvan.dani](https://discuss.elastic.co/u/razvan.dani)\
**Post date:** [November 27, 2015, 2:35pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/1 "2015-11-27T14:35:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 27, 2015, 3:27pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/2 "2015-11-27T15:27:03Z")

</div>

Most likely [https://github.com/elastic/elasticsearch/issues/14400](https://github.com/elastic/elasticsearch/issues/14400)

---

<div class="post-metadata">

**Author:** ![razvan.dani](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@razvan.dani](https://discuss.elastic.co/u/razvan.dani)\
**Post date:** [December 2, 2015, 10:13am UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/3 "2015-12-02T10:13:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 2, 2015, 10:38am UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/4 "2015-12-02T10:38:05Z")

</div>

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

```auto

```

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

---

<div class="post-metadata">

**Author:** ![razvan.dani](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@razvan.dani](https://discuss.elastic.co/u/razvan.dani)\
**Post date:** [December 2, 2015, 10:54am UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/5 "2015-12-02T10:54:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 2, 2015, 10:55am UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/6 "2015-12-02T10:55:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![razvan.dani](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@razvan.dani](https://discuss.elastic.co/u/razvan.dani)\
**Post date:** [December 2, 2015, 11:08am UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/7 "2015-12-02T11:08:07Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 2, 2015, 12:08pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/8 "2015-12-02T12:08:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![razvan.dani](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@razvan.dani](https://discuss.elastic.co/u/razvan.dani)\
**Post date:** [December 2, 2015, 12:23pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/9 "2015-12-02T12:23:50Z")

</div>

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"  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 2, 2015, 12:52pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/10 "2015-12-02T12:52:21Z")

</div>

So everything is fine.  
What is not working?

---

<div class="post-metadata">

**Author:** ![Madhuri\_Vemuri](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@Madhuri\_Vemuri](https://discuss.elastic.co/u/Madhuri_Vemuri)\
**Post date:** [February 17, 2016, 4:16pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/11 "2016-02-17T16:16:47Z")

</div>

hey did u find a solution for this

I am facing the same problem

---

<div class="post-metadata">

**Author:** ![VIGHNESH\_KHALANTH](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@VIGHNESH\_KHALANTH](https://discuss.elastic.co/u/VIGHNESH_KHALANTH)\
**Post date:** [March 8, 2016, 11:51am UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/12 "2016-03-08T11:51:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RohanKumbhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohankumbhar/32/23649_2.png) [@RohanKumbhar](https://discuss.elastic.co/u/RohanKumbhar)\
**Post date:** [March 8, 2016, 1:51pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/13 "2016-03-08T13:51:15Z")

</div>

Hi ,

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

Thanks,  
Rohan

---

<div class="post-metadata">

**Author:** ![Carlos\_Vega\_Moreno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_vega_moreno/32/3773_2.png) [@Carlos\_Vega\_Moreno](https://discuss.elastic.co/u/Carlos_Vega_Moreno)\
**Post date:** [March 9, 2016, 9:16am UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/14 "2016-03-09T09:16:15Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![RohanKumbhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohankumbhar/32/23649_2.png) [@RohanKumbhar](https://discuss.elastic.co/u/RohanKumbhar)\
**Post date:** [March 23, 2016, 1:16pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/15 "2016-03-23T13:16:48Z")

</div>

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

can you please help here to fix this?

Thanks,  
Rohan

---

<div class="post-metadata">

**Author:** ![elvarb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elvarb/32/44840_2.png) [@elvarb](https://discuss.elastic.co/u/elvarb)\
**Post date:** [May 3, 2016, 12:07pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/16 "2016-05-03T12:07:54Z")

</div>

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.

---

<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 13, 2017, 11:23pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/17 "2017-03-13T23:23:11Z")

</div>

> [@elvarb](#):
>
> lso this warning can come up when you have 3 nodes in a cluster and require minimum 2 master nodes but only 1 is available.

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]

---

<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:49pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/18 "2017-03-14T19:49:36Z")

</div>

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.

---

<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:02pm UTC](https://discuss.elastic.co/t/elasticsearch-warning-at-startup-exception-caught-on-transport-layer/35768/19 "2017-07-05T22:02:16Z")

</div>


