# Handling exception: Connection reset by peer

**URL:** <https://discuss.elastic.co/t/handling-exception-connection-reset-by-peer/125194>\
**Category:** Logstash\
**Created:** [March 22, 2018, 1:17pm UTC](https://discuss.elastic.co/t/handling-exception-connection-reset-by-peer/125194 "2018-03-22T13:17:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faktu4noCaM](https://avatars.discourse-cdn.com/v4/letter/f/71c47a/32.png) [@Faktu4noCaM](https://discuss.elastic.co/u/Faktu4noCaM)\
**Post date:** [March 22, 2018, 1:17pm UTC](https://discuss.elastic.co/t/handling-exception-connection-reset-by-peer/125194/1 "2018-03-22T13:17:46Z")

</div>

Hi!  
After update ELK stack from 6.2.2 to 6.2.3, i recieved warning message in Logstash logs:

> **Log text**
>
> [2018-03-22T14:28:20,354][INFO][org.logstash.beats.BeatsHandler] [local: 0.0.0.0:5045, remote: 100.100.36.9:49199] Handling exception: Connection reset by peer  
> [2018-03-22T14:28:20,355][WARN][io.netty.channel.DefaultChannelPipeline] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.  
> java.io.IOException: Connection reset by peer  
> at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:1.8.0\_162]  
> at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:1.8.0\_162]  
> at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0\_162]  
> at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0\_162]  
> at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[?:1.8.0\_162]  
> at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1108) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:345) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:126) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) [netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0\_162]  
> [2018-03-22T14:28:20,459][INFO][org.logstash.beats.BeatsHandler] [local: 0.0.0.0:5045, remote: 100.100.36.9:51370] Handling exception: Connection reset by peer  
> [2018-03-22T14:28:20,459][WARN][io.netty.channel.DefaultChannelPipeline] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.  
> java.io.IOException: Connection reset by peer  
> at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:1.8.0\_162]  
> at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:1.8.0\_162]  
> at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0\_162]  
> at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0\_162]  
> at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[?:1.8.0\_162]  
> at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1108) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:345) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:126) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) ~[netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) [netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.18.Final.jar:4.1.18.Final]  
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0\_162]

Before update i recieved only  
[2018-03-22T14:28:20,459][INFO][org.logstash.beats.BeatsHandler] [local: 0.0.0.0:5045, remote: 100.100.36.9:51370] Handling exception: Connection reset by peer  
when remote PC with beats have been powered off (or winservice stopped).

How to handle this issue?

---

<div class="post-metadata">

**Author:** ![Faktu4noCaM](https://avatars.discourse-cdn.com/v4/letter/f/71c47a/32.png) [@Faktu4noCaM](https://discuss.elastic.co/u/Faktu4noCaM)\
**Post date:** [March 26, 2018, 11:35am UTC](https://discuss.elastic.co/t/handling-exception-connection-reset-by-peer/125194/2 "2018-03-26T11:35:38Z")

</div>

The problem is still actuall! can anyone help to find out what the problem is?

---

<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:** [April 23, 2018, 11:47am UTC](https://discuss.elastic.co/t/handling-exception-connection-reset-by-peer/125194/3 "2018-04-23T11:47:09Z")

</div>

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