-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Envoy proxy returns 502 reset reason: protocol error for upstream error 502 Bad Gateway #36711
Comments
In envoy's log, it shows response has two
Looks like this issue is same as #24753, see this issue comment. A PR was raised by @lambdai for fixing this issue was closed: envoyproxy/envoy#11916, please check the comment for the reason. This issue should be resolved on application-side by removing duplicated |
Thanks @l8huang, I think we already have the fix envoyproxy/envoy#15033 that's why it returns 502 protocol error but this error msg is more confusing than the 502 bad gateway. @lambdai what's your thought? |
Because application's 502 response had two |
@l8huang I see, thanks. Upstream app returns two header
This is Transfer-Encoding: chunked twice in same http response, same issue as here #24753 (comment),
So it's a upstream app issue, need to fix in the app side to remove the duplicated header |
Bug Description
This issue is similar with #24753. Our case is using Istio as Ingress gateway and there is sidecar injection in the backend app. The problem here is that for some requests application will return 502 Bad Gateway but the client will get 502 with error msg
upstream connect error or disconnect/reset before headers. reset reason: protocol error
. Overall flow is as below:Expected behavior
The client should get whatever application returned. Here the response code is not changed but the response message is confusing, it should be just
502 Bad Gateway
.Sidecar trace Log
Sidecar access log
Version
Additional Information
No response
The text was updated successfully, but these errors were encountered: