-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
socket_options on listeners are not working on 1.17+ #18107
Comments
My dumb question: shouldn the keep alive sock options be applied to accepted socket instead of listen socket? I don't know through what mechanism that the keepalive worked before 1.17, but keep alive setting at downstream connection is indded something that added to listener option. I also find this issue #3634 |
@lambdai Sorry not sure what do you mean. Are you saying this is not a bug and you don't know how was it working before 1.17? The issue you have linked was the original feature request ticket for implementing this exact feature which worked fine until it broke in 1.17 |
huh. @mattklein123 @snowp any ideas what might have caused a difference in TCP keep-alive or socket option proceeing between 1.16 and 1.17? Nothing comes to mind for me :-/ |
Not sure. Can you potentially come up with a self contained repro on top of current main branch? I think debug/trace output should make it clear what socket options are being applied but I'm not sure. We can debug further from there? |
Not sure what changed but |
Sorry I have no idea why it doesn't work after calling listen() now, but it used to before. PREBIND or BOUND seems more correct to me. If someone wants to debug why/how this changed please do. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
Thanks @mattklein123 and @ramaraochavali changing to STATE_PREBIND helped. |
I don't think it's worth investigating this so I'm just going to close. Thanks for the follow up. |
Title: socket_options on listeners are not working on 1.17+
Description:
Everything was working as expected up until v1.16.x. Once we upgraded to 1.17+ clients started complaining that they started receiving "Connection reset by peer" errors. Digging into it I found out that socket_options setting above are not being respected and once the connection is idle above the NLBs 350s limit, it will be closed by NLB but client would not know about it until it tries to send another request later on which will blow up with "Connection reset by peer".
Repro steps:
docker-compose -f docker-compose-protos.yaml up --remove-orphans
docker-compose up --build
grpc-client-proxy
will act as gRPC client forgrpc-server-proxy
Envoy which has the socket_options defined for the listener. With version 1.16.5 defined forgrpc-server-proxy
we can see that attached wireshark container logging every 20 second.grpc-server-proxy
to anything 1.17.0 and above and restarting step 2, the TCP Keep-alive packets will not be sent anymore.The text was updated successfully, but these errors were encountered: