-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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/1.x transport connection broken: unsupported transfer encoding: "identity" on docker engine REST API #40735
Comments
after some learning, this seems to be expected behavior.. |
@h8liu how did you solve it? I'm having a similar issue. |
I did not solve it. I mitigated it by running all stuff on a linux machine. The issue seems to be OSX only. I am guessing that the OSX docker desktop app has some kind of reverse proxy for the socket that is doing stuff incorrectly, but I don't know for sure. |
I closed it because I don't think golang client library is doing anything wrong, although this seems like a regression. |
It's worth mentioning - since I came here from the testcontainers-go issue - that the Docker daemon on macOS works perfectly well with the appropriate TestContainers libraries for Go 1.14.7, with Rust, with Node and with Java, as well as just the standard Docker tooling. It only doesn't work with Go 1.15. I'm not sure if the Go libraries for communicating with Docker work differently than in all those other languages - given that Docker itself is written in Go, that is possible - but when something is broken in only one version of one language which has itself only just been released, it very much feels like a newly introduced bug. |
I also stumbled upon this via |
@sazzer @iulian-gm as you have noted that In your opinion this issue is not fixed would you please raise a new issue, fill out the template and provide a way for someone to reproduce the issues you are experiencing. Thank you |
I'm seeing the same thing - can this issue just be reopened? It follows the template and provides a way to reproduce Edit: It might have been caused by the work to fix #38867 but I couldn't find any points in Docker that explicitly set the transfer encoding to identity (although I'm not too familiar with transfer-encoding/identity). Debugging the example provided by @h8liu does indeed show "identity" being returned by the server |
Thank you to those who have commented. Re new issue vs continuing one that was closed without conclusion. It is my experience that the likelihood of an issue being closed successfully is inversely proportionate to its length. Focused issues with clear instructions to reproduce the problem are often closed quickly. To that end, please default to raising new issues. If there is a cost in terms of deduplicating issues that is one myself and the other issue gardeners are happy to invest in to see issues diagnosed and resolved quickly. |
reopened per requests @tankbusta the head of this thread has a working example program that can reproduce the issue on OSX, but it does not reproduce on Linux (with very close docker versions that are compiled with the same golang version). So I think it is not that the docker API server socket is broken, but there is an adopter layer specifically used in OSX's docker app, that is forwarding the http requests between the http client and server incorrectly. At the very least, I think golang's http clients in go1.15 works well with former golang http servers, which is why I think it is not golang's "fault", although it is certainly a regression (breaking change), but for a good security reason. I am also filing an issue to docker/for-mac: https://github.com/docker/for-mac/issues |
imho, I don't think golang team needs to do anything. I am just leaving this issue open so that people can more easily discover this. the root cause of this issue very likely lies in docker's macos app. |
@h8liu i would prefer if this issue were closed and discussion happened elsewhere until it was determined that there was a bug in the net/http package. To be clear, if its a bug in the http package, it'll be fixed. If its related to how another project is using the http package, then that discussion belongs elsewhere. |
okay, you are the boss. :) |
This runtime IIUC is what after all runs the Go unit tests invoked by makefile target `go-unit-tests`. For #257 try out if "creating reaper failed" goes away with Go 1.14. https: //github.com/testcontainers/testcontainers-go/issues/232 https: //github.com/golang/go/issues/40735 Signed-off-by: Dr. Jan-Philip Gehrcke <jp@opstrace.com>
This runtime IIUC is what after all runs the Go unit tests invoked by makefile target `go-unit-tests`. For #257 try out if "creating reaper failed" goes away with Go 1.14. https: //github.com/testcontainers/testcontainers-go/issues/232 https: //github.com/golang/go/issues/40735 Signed-off-by: Dr. Jan-Philip Gehrcke <jp@opstrace.com>
This runtime IIUC is what after all runs the Go unit tests invoked by makefile target `go-unit-tests`. For #257 try out if "creating reaper failed" goes away with Go 1.14. https: //github.com/testcontainers/testcontainers-go/issues/232 https: //github.com/golang/go/issues/40735 Signed-off-by: Dr. Jan-Philip Gehrcke <jp@opstrace.com>
This runtime IIUC is what after all runs the Go unit tests invoked by makefile target `go-unit-tests`. For #257 try out if "creating reaper failed" goes away with Go 1.14. https: //github.com/testcontainers/testcontainers-go/issues/232 https: //github.com/golang/go/issues/40735 Signed-off-by: Dr. Jan-Philip Gehrcke <jp@opstrace.com>
This runtime IIUC is what after all runs the Go unit tests invoked by makefile target `go-unit-tests`. For #257 try out if "creating reaper failed" goes away with Go 1.14. https: //github.com/testcontainers/testcontainers-go/issues/232 https: //github.com/golang/go/issues/40735 Signed-off-by: Dr. Jan-Philip Gehrcke <jp@opstrace.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
docker create --name test alpine sleep 1000
docker start test
go run
the following program:What did you expect to see?
See
hello
.What did you see instead?
Docker version
Some additional notes:
go1.14.7 run
(because the transfer encoding enforcement was not there I think).The text was updated successfully, but these errors were encountered: