New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.IOException: Connection reset by peer ? #5936

Closed
honyee opened this Issue Oct 24, 2016 · 12 comments

Comments

Projects
None yet
@honyee
Copy link

honyee commented Oct 24, 2016

@trustin
Hi, trustin:
My netty application have a exception ,please help me look the question , Thank you !

Exception:_ WARN 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. io.netty.util.internal.logging.Slf4JLogger.warn(Slf4JLogger.java:151)
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:311)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:225)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)

@Scottmitch

This comment has been minimized.

Copy link
Member

Scottmitch commented Oct 24, 2016

Can you describe your issue? Connection reset by peer is typically a result of your peer sending a TCP RST to you ... which without more context this doesn't say much.

@honyee

This comment has been minimized.

Copy link

honyee commented Oct 25, 2016

@Scottmitch Thank you, This problem has been solved,Is due to the load balance caused by the exception !

@Scottmitch

This comment has been minimized.

Copy link
Member

Scottmitch commented Oct 27, 2016

@honyee - Thanks for confirming. I will close this for now. If you could be more descriptive about how you resolved the issue that also may help users who face similar issues in the future.

@Scottmitch Scottmitch closed this Oct 27, 2016

@kiransunkari

This comment has been minimized.

Copy link

kiransunkari commented May 29, 2017

@honyee how did you solve this problem , the same problem arised in the production for us

@tkzandgj

This comment has been minimized.

Copy link

tkzandgj commented Aug 10, 2017

@honyee how did you solve this problem?

@xptree

This comment has been minimized.

Copy link

xptree commented Sep 5, 2017

@honyee how did you solve this problem? could you be more descriptive about the load balance issues?

@velikanov

This comment has been minimized.

Copy link

velikanov commented Jan 23, 2018

@honyee you know what I want to write here :)

@debashisdeb

This comment has been minimized.

Copy link

debashisdeb commented Feb 22, 2018

HOW DID YOU 😄

@youngss56

This comment has been minimized.

Copy link

youngss56 commented Apr 20, 2018

hi, how did you resolve the issue? how did you know it's Load Balance caused it? I am getting the same message

@bduisenov

This comment has been minimized.

Copy link

bduisenov commented Jul 30, 2018

+1

@MarsYoung

This comment has been minimized.

Copy link

MarsYoung commented Jul 31, 2018

any one can post this solution? catch the exception in java or forbidden these request?

@sivssdn

This comment has been minimized.

Copy link

sivssdn commented Aug 14, 2018

Solution Please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment