# NPE: Unexpected I/O exception on channel

**URL:** <https://community.gatling.io/t/npe-unexpected-i-o-exception-on-channel/2438>\
**Category:** Gatling (Open-Source)\
**Created:** [August 4, 2015, 12:45pm UTC](https://community.gatling.io/t/npe-unexpected-i-o-exception-on-channel/2438 "2015-08-04T12:45:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niko\_Will](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Niko\_Will](https://community.gatling.io/u/Niko_Will)\
**Post date:** [August 4, 2015, 12:45pm UTC](https://community.gatling.io/t/npe-unexpected-i-o-exception-on-channel/2438/1 "2015-08-04T12:45:19Z")

</div>

Hi,

we are using Gatling in version 2.2.0-M3 (because we use the AMQP plugin) together with the maven plugin version 2.2.0-M2. Since a few days we receive the following exception if we set the log level to DEBUG:

`

[INFO] — gatling-maven-plugin:2.2.0-M2:execute (Update Relations) @ relations-test-performance —  
Simulation com.bosch.cr.relations.test.performance.rest.UpdateRelations started…  
14:00:06.146 [INFO] i.g.c.r.w.ConsoleDataWriter - Initializing  
14:00:06.160 [INFO] i.g.c.r.w.FileDataWriter - Initializing  
14:00:06.303 [INFO] i.g.c.r.w.FileDataWriter - Initialized  
14:00:06.311 [INFO] i.g.c.r.w.ConsoleDataWriter - Initialized  
14:00:06.689 [INFO] i.g.h.c.HttpProtocol$ - Start warm up  
14:00:06.849 [DEBUG] o.j.n.c.s.n.SelectorUtil - Using select timeout of 500  
14:00:06.849 [DEBUG] o.j.n.c.s.n.SelectorUtil - Epoll-bug workaround enabled = false  
14:00:09.231 [DEBUG] o.j.n.c.DefaultChannelFuture - The dead lock checker in DefaultChannelFuture has been disabled as requested at your own risk.  
14:00:09.807 [DEBUG] c.n.h.c.p.n.h.Processor - Unexpected I/O exception on channel [id: 0x947bd555, /10.55.67.160:36651 =\> [gatling.io/192.30.252.153:80](http://gatling.io/192.30.252.153:80)]  
java.lang.NullPointerException: null  
at org.jboss.netty.handler.codec.http.HttpClientCodec$Decoder.isContentAlwaysEmpty(HttpClientCodec.java:179) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeaders(HttpMessageDecoder.java:542) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:195) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:143) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:127) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:92) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [netty-3.10.3.Final.jar:na]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0\_40]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0\_40]  
at java.lang.Thread.run(Thread.java:745) [na:1.8.0\_40]  
14:00:09.823 [DEBUG] c.n.h.c.p.n.c.ChannelManager - Closing Channel [id: 0x947bd555, /10.55.67.160:36651 =\> [gatling.io/192.30.252.153:80](http://gatling.io/192.30.252.153:80)]  
14:00:09.826 [DEBUG] c.n.h.c.p.n.h.Processor - Unexpected I/O exception on channel [id: 0x947bd555, /10.55.67.160:36651 :\> [gatling.io/192.30.252.153:80](http://gatling.io/192.30.252.153:80)]  
java.lang.NullPointerException: null  
at org.jboss.netty.handler.codec.http.HttpClientCodec$Decoder.isContentAlwaysEmpty(HttpClientCodec.java:179) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeaders(HttpMessageDecoder.java:542) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:195) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:143) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:127) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.cleanup(ReplayingDecoder.java:554) ~[netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.frame.FrameDecoder.channelDisconnected(FrameDecoder.java:365) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:92) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:396) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:360) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:58) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleDownstream(HttpClientCodec.java:97) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:109) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.Channels.close(Channels.java:812) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.AbstractChannel.close(AbstractChannel.java:206) [netty-3.10.3.Final.jar:na]  
at com.ning.http.client.providers.netty.channel.Channels.silentlyCloseChannel(Channels.java:48) [async-http-client-1.9.24.jar:na]  
at com.ning.http.client.providers.netty.channel.ChannelManager.closeChannel(ChannelManager.java:370) [async-http-client-1.9.24.jar:na]  
at com.ning.http.client.providers.netty.handler.Processor.exceptionCaught(Processor.java:184) [async-http-client-1.9.24.jar:na]  
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:112) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:142) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.exceptionCaught(SimpleChannelUpstreamHandler.java:153) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:112) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:112) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:92) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.notifyHandlerException(DefaultChannelPipeline.java:658) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:566) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.10.3.Final.jar:na]  
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [netty-3.10.3.Final.jar:na]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0\_40]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0\_40]  
at java.lang.Thread.run(Thread.java:745) [na:1.8.0\_40]  
14:00:09.827 [DEBUG] c.n.h.c.p.n.c.ChannelManager - Closing Channel [id: 0x947bd555, /10.55.67.160:36651 :\> [gatling.io/192.30.252.153:80](http://gatling.io/192.30.252.153:80)]  
14:00:09.831 [DEBUG] c.n.h.c.p.n.h.Processor - Channel Closed: [id: 0x947bd555, /10.55.67.160:36651 :\> [gatling.io/192.30.252.153:80](http://gatling.io/192.30.252.153:80)] with attribute INSTANCE  
14:00:09.839 [DEBUG] c.n.h.c.p.n.r.NettyConnectListener - Using non-cached Channel [id: 0x947bd555, /10.55.67.160:36651 :\> [gatling.io/192.30.252.153:80](http://gatling.io/192.30.252.153:80)] for GET ‘/’

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [August 5, 2015, 7:52am UTC](https://community.gatling.io/t/npe-unexpected-i-o-exception-on-channel/2438/2 "2015-08-05T07:52:16Z")

</div>

The stacktrace seems to say the issue is in Netty.  
I’m on vacation atm, could you please report your issue on the Netty bug tracker, please?

---

<div class="post-metadata">

**Author:** ![Niko\_Will](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Niko\_Will](https://community.gatling.io/u/Niko_Will)\
**Post date:** [August 5, 2015, 9:57am UTC](https://community.gatling.io/t/npe-unexpected-i-o-exception-on-channel/2438/3 "2015-08-05T09:57:15Z")

</div>

Thanks for your reply. Actually, it looks like a problem of our CI server (Jenkins). All tests passed locally without issues, only the execution on Jenkins failed. After restarting it, the tests went through again.

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [August 5, 2015, 12:48pm UTC](https://community.gatling.io/t/npe-unexpected-i-o-exception-on-channel/2438/4 "2015-08-05T12:48:38Z")

</div>

Great! Still the NPE is really weird.
