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

netty Connection reset by peer caused by RST,ACK #6029

craigwu9 opened this Issue Nov 16, 2016 · 5 comments


None yet
5 participants
Copy link

craigwu9 commented Nov 16, 2016

We use haproxy to do load balance, and the netty server keep to rise " Connection reset by peer"
below is the exception stack: Connection reset by peer at Method) at at at at at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes( at io.netty.buffer.AbstractByteBuf.writeBytes( at at$ at at at at at io.netty.util.concurrent.SingleThreadEventExecutor$ at io.netty.util.concurrent.DefaultThreadFactory$ at

I use tcpdump to dump the network data of the netty server, and see below

image,, are hapxory server ip
Seems haproxy just send [RST,ACK] to finish a health check.

So, I am wondering if I have to handle this situation in my handler(like check exception is IOException, just ignore it, because the log is full of this exception) , or it should be handled by netty it self?


This comment has been minimized.

Copy link

Scottmitch commented Nov 18, 2016

If your peer sends a RST the TCP socket will be closed. You can ignore the exception at the application level but that doesn't change the kernel's behavior. Please identify why HAProxy is sending a RST and re-open this issue if you feel it can be attributed to a bug related to Netty.

@Scottmitch Scottmitch closed this Nov 18, 2016


This comment has been minimized.

Copy link

kiransunkari commented Jun 4, 2017

@craigwu9, iam also facing the same problem when I deployed in azure, how you solved the problem


This comment has been minimized.

Copy link

craigw commented Jun 4, 2017

@kirunsunkari I think you meant to tag @craigwu9 not me.


This comment has been minimized.

Copy link

craigwu9 commented Jun 22, 2017

@kiransunkari no good solution yet, just ignore it and log to a specific log file.


This comment has been minimized.

Copy link

MarsYoung commented Jul 31, 2018

how to ignore this log @kiransunkari

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