-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
net/http: http.Get fails with "connection reset by peer" after update to Go 1.23 but works flawlessly up to 1.22.8 #70139
Comments
CC @neild @golang/security Thanks for providing a small test case. Unfortunately, I can't recreate the problem. In all cases when I run your program I get
I've tried with various language versions in go.mod and various compiler versions. |
Thanks for your answer. For us, it works on most machines but fails on all 30+ ci agents and I have no more idea what could cause this issue. Is there some way to debug this further? |
I think you need to look at your proxy. It's the one that's terminating the connections. |
Try |
But when I compile with go 1.22.8 (or lower) it works with the same proxy, only when using go 1.23.0 or higher and everything else is exactly the same, it fails. |
Thank your for your hint. I now went thru all the GODEBUG Values, my |
Nevermind. I set it in the wrong layer (my app runs nested in one more container that was missing the GODEBUG). |
Glad we could help! If you can share any details about the proxy, sometimes we can backchannel to the vendors, or at least document it for the next person. |
I'll see if I can get that information and post back here and also in tldr.fail. |
Sorry for the late reply. But here are the data: |
Go version
go version go1.23.2 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I have a very simple repro app that just downloads a file via
http.get
The code for this is:
This code is compiled and runs in a container in a GitLab pipeline. The http_proxy and https_proxy variables are set as a proxy is needed for the CI to connect to the outside world.
What did you see happen?
The code above works great if the go version in
go.mod
ist at max1.22.8
. As soon as I set it to1.23.0
or higher, the download always fails withThis is 100% reproducible in our environment. 1.22.8 (or lower) always works, starting from 1.23.0 it always fails without changing anything else.
What did you expect to see?
In other environments (also on the lokal workstation with also needs a proxy), this works regardless of the go version but on all GitLab runners, it always fails and I am pretty much at a loss on what I could do more to fix this.
The text was updated successfully, but these errors were encountered: