Closed themasch closed 3 years ago
Hi there,
It looks like our lib is not 100% compliant with docker 1.11 (API Version 1.23)
With docker 1.10, the example code works well.
I'm trying to understand what is going on.
Okay, sadly I can't (easily) downgrade to docker 1.10 on my dev box because it's not in the repository anymore.
[EDIT] I tried mirroring the request with curl and got this:
% sudo curl --unix-socket /var/run/docker.sock http:/containers/json -vvv -H"Host: ///var/run/docker.sock:0" 101 ↵ ✹
* Trying /var/run/docker.sock...
* Connected to http (/var/run/docker.sock) port 80 (#0)
> GET /containers/json HTTP/1.1
> Host: ///var/run/docker.sock:0
> User-Agent: curl/7.45.0
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< Content-Type: text/plain
< Connection: close
<
* Closing connection 0
400 Bad Request: malformed Host header
Seems like the Host
HTTP-Header causes the problem. Specifing a host when using unix-socket doesn't make sense to me at all. Can the header be omitted?
[Edit2]:
I think that is a ""bug"" in hyper: http://hyper.rs/hyper/v0.9.10/src/hyper/src/client/mod.rs.html#309
Its always sending a Host
-Header.
Can this be fixed in hyperlocal or do we need to open a ticket on hyper itself?
Indeed, it looks like a real problem :s.
First we need to see if we can remove the header from Hyperlocal. If we can't we will open a ticket on Hyper.
For your downgrade, it's strange. :s. What distribution are you using ?
I'm using gentoo.
I configured docker to listen to a tcp socket for further development. Will post a PR for some fixes regarding hostname/ip & port handling with http(s) connections soon.
I think this was fixed by 448ea95b4cbfe487501f79f150d87757d724bec8. Can you please try again?
I man I really missed this issue. http://doc.crates.io/specifying-dependencies.html#specifying-dependencies-from-git-repositories is how to test a git url dependency in your cargo build. I'm on vacation and away from my laptop. I'll try to publish recent fixes as soon as I can
If you could decide on concrete version or range we could pin endpoint to that and write serialization tests. I had a similar issue: this https://github.com/softprops/shiplift/blob/master/src/rep.rs#L152 is an array now. I'm pretty sure there are other issues.
I just published version 0.3.0 can you try that. I did need to make a few changes to what was on master to get things back up to speed.
I'm testing with what I think should be pretty close to the latest and greatest.
$ docker version
Client:
Version: 1.13.0-rc3
API version: 1.25
Go version: go1.7.3
Git commit: 4d92237
Built: Tue Dec 6 01:15:44 2016
OS/Arch: darwin/amd64
Server:
Version: 1.13.0-rc4
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 88862e7
Built: Sat Dec 17 01:34:17 2016
OS/Arch: linux/amd64
Experimental: false
If you are still are having trouble can you comment with the output of docker version
in this issue
Still an issue
Client:
Version: 1.12.5
API version: 1.24
Go version: go1.6.4
Git commit: 7392c3b
Built: Fri Dec 16 02:42:17 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.5
API version: 1.24
Go version: go1.6.4
Git commit: 7392c3b
Built: Fri Dec 16 02:42:17 2016
OS/Arch: linux/amd64
This fixes things to me https://github.com/softprops/shiplift/pull/33
This seems fixed @softprops, can you confirm @themasch ?
Is this issue still relevant?
@elihunter173 not for me.
Alright, could you close the issue then please? (I don't have the perms to)
I'm getting a
Fault { code: BadRequest, message: "bad parameter" }
on every request to docker.Here a two complete backtraces, created by running the examples from master:
I tried to debug it but wasn't lucky. I'm using docker 1.11.
Using curl works fine:
Any Ideas on what I'm doing wrong?