# Exception caught on transport layer

**URL:** <https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655>\
**Category:** Elasticsearch\
**Created:** [December 31, 2017, 11:34am UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655 "2017-12-31T11:34:22Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Koustav\_Chatterjee](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Koustav\_Chatterjee](https://discuss.elastic.co/u/Koustav_Chatterjee)\
**Post date:** [December 31, 2017, 11:34am UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/1 "2017-12-31T11:34:22Z")

</div>

I am using ElasticSearch 2.3 on ec2(ubuntu). I had run sudo apt-get update and upgrade.Then restart the box.

When i start the ES,this is what i run into.

```auto
[2017-12-31 11:33:21,605][WARN][transport.netty] [Quasar II] exception caught on transport layer [[id: 0xc3e54945, /0:0:0:0:0:0:0:1:33556 => /0:0:0:0:0:0:0:1:9300]], closing connection
java.lang.NullPointerException
	at org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:207)
	at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:202)
	at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:136)
	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
	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:1152)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
	at java.lang.Thread.run(Thread.java:748)

```

---

<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 31, 2017, 12:31pm UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/2 "2017-12-31T12:31:25Z")

</div>

I removed `---- Please help. It's urgent` in the title.

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

---

<div class="post-metadata">

**Author:** ![Koustav\_Chatterjee](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Koustav\_Chatterjee](https://discuss.elastic.co/u/Koustav_Chatterjee)\
**Post date:** [December 31, 2017, 1:00pm UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/3 "2017-12-31T13:00:55Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [December 31, 2017, 4:35pm UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/4 "2017-12-31T16:35:25Z")

</div>

This happens in 2.x if you have an old 1.x node running on the system as well. This is handled more gracefully in later versions.

---

<div class="post-metadata">

**Author:** ![Koustav\_Chatterjee](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Koustav\_Chatterjee](https://discuss.elastic.co/u/Koustav_Chatterjee)\
**Post date:** [December 31, 2017, 10:30pm UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/5 "2017-12-31T22:30:06Z")

</div>

This is a single node cluster.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [December 31, 2017, 11:42pm UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/6 "2017-12-31T23:42:34Z")

</div>

That's fine. I'm telling you that I think the old process was still running. The long and the short of this issue is that it's harmless.

---

<div class="post-metadata">

**Author:** ![Koustav\_Chatterjee](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Koustav\_Chatterjee](https://discuss.elastic.co/u/Koustav_Chatterjee)\
**Post date:** [January 1, 2018, 12:20am UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/7 "2018-01-01T00:20:59Z")

</div>

The issue was gone after i rebooted the server.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 1, 2018, 1:05am UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/8 "2018-01-01T01:05:52Z")

</div>

Which would have killed any running processes of an older version. 😐

---

<div class="post-metadata">

**Author:** ![Koustav\_Chatterjee](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Koustav\_Chatterjee](https://discuss.elastic.co/u/Koustav_Chatterjee)\
**Post date:** [January 1, 2018, 3:47am UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/9 "2018-01-01T03:47:23Z")

</div>

Is there a way i can cross check this?  
The exception stack thrown does not give enough information.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 1, 2018, 1:33pm UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/10 "2018-01-01T13:33:04Z")

</div>

It happens because of a protocol incompatibility between 1.x and 2.x. The simplest way to reproduce this:

- start a 1.x node, bind it to localhost
- start a 2.x node with the defaults

The 2.x node will try to ping the 1.x node. The NPE with exactly the same stacktrace will appear in the logs. Why does this happen? The 1.x node throws an exception because it does not understand the pings from 2.x and tries to send this exception back to the 2.x node. 1.x relied on Java serialization for serializing exceptions. 2.x does not, instead we use our own serialization of exceptions. 2.x sees there is an exception from the remote node, but tries to de-serialize it using our own serialization, rather than the Java serialization that 1.x used. This leads to no exception being read from the wire (in fact, if you run with assertions an assertion will trip instead) and null is returned. This null pointer is then dereferenced, 💥.

---

<div class="post-metadata">

**Author:** ![Koustav\_Chatterjee](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Koustav\_Chatterjee](https://discuss.elastic.co/u/Koustav_Chatterjee)\
**Post date:** [January 1, 2018, 1:45pm UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/11 "2018-01-01T13:45:17Z")

</div>

Thanks now i got it.😀😀😀

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [January 1, 2018, 1:56pm UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/12 "2018-01-01T13:56:14Z")

</div>

You’re very welcome.

---

<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:** [January 29, 2018, 1:56pm UTC](https://discuss.elastic.co/t/exception-caught-on-transport-layer/113655/13 "2018-01-29T13:56:51Z")

</div>

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