-
Notifications
You must be signed in to change notification settings - Fork 564
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
fix error with unix socket not resolving on dial #621
Conversation
@faide that's surprising. The example on README should work fine. Can you provide more information on your environment? Is Docker bound to |
Hello, I created a sample project that reproduces the issue: https://github.com/faide/dockerpilot In this project I used govendor to pin dependencies that were used at the time. Nothing fancy here I just pulled the latest of each dependency and pinned the versions with govendor to help reproduce. My system is:
|
to reproduce: install govendor: checkout master of the demo project (Without the PR applied to the go-dockerclient), checkout the pr-activated branch of the demo project (the current PR is applied to the vendored go-dockerclient) |
@fsouza this commit is the source of this issue: hashicorp/go-cleanhttp@a459706 as you can see the latest go-cleanhttp is not using transport.Dial anymore but transport.DialContext, thus the code was changing the false Dialer and was having no effect if you were using the latest go-cleanhttp revision. I suspect this is the case only with go-1.7+ (as go-1.6 and lower are just broken by the latest go-cleanhttp revision and cannot work anymore) This commit is from feb 11, I must have stumbled on it just a few minutes after it was committed :) |
@fsouza btw this means that all test in the matrix that are using go < 1.7 will fail with the newer version of hashicorp cleanhttp. According to this you can just drop support for go 1.6 I do not get why I have a failure on 1.7 with the i386 build with docker 1.11.2. This appears only on i386 on this specific version of docker... strange. |
@faide thanks for that PR! I was wondering what was going on ... @fsouza not sure if this helps in the troubleshooting, but master works when the unix socket is local, but it didn't work when I was using the unix socket inside a container(golang:1.7). I had everything vendored too. Hopefully that's not a red herring but it's a problem I observed. |
This fix works fine with docker on Mac. |
Quick note: I decided to merge this after reading the reports on #622. |
the first example of README fails with:
panic: Get http://unix.sock/images/json?: dial tcp: lookup unix.sock on 127.0.1.1:53: no such host
on a Ubuntu.
After investigations it appears the Dial attribute of the hashicorp cleanhttp.DefaultTransport() is deprecated. Using the new recommanded DialContext fixes the issue...