-
Notifications
You must be signed in to change notification settings - Fork 549
Cannot connect using docker for mac with unix socket in 8.9.2 #928
Comments
To verify this wasn't an issue with the old versions of these dependencies being cached, I removed all the jnr dependencies from my gradle and maven caches. When I recompiled my project, it downloaded these versions:
I get the same error. |
Version 8.9.2 has updated JNR dependencies. In my testing, these are broken when connecting to docker over a Unix Socket. See [spotify/docker-client#928](spotify/docker-client#928).
@johnflavin Thanks for reporting. I was able to run this code successfully. final DockerClient client = DefaultDockerClient.builder()
.uri("unix:///var/run/docker.sock")
.build();
client.ping();
System.out.println(client.version()); I deleted my cached jnr jars before hand. I ran on ubuntu 14.04 trusty with
The system user I used to run the tests is in the docker group. On my mac I use docker-machine and connect on a TCP socket. Are you using docker for mac? |
Yes, this occurs using docker for mac and connecting over a unix socket. (And, side note, docker for mac cannot be configured to use TCP. If you try to set the When I create a But I would think that isn't surprising. The jnr changes were about the code for unix socket connections. Nothing about the TCP connections should be impacted. |
I've updated the issue title and description to explicitly include docker for mac details. |
Thanks for the update. My first test case I wrote about above was on ubuntu with unix socket. Let me try docker for mac now. |
I think I've figured out that this is a problem with one of my other dependencies packaging an older version of the jnr libraries. This isn't a docker-client problem, it's just a me problem. |
phew, thanks. I was worried for a second. For the record, the shaded docker-client jar works with unix socket on DFM running docker 17.09. |
Description
After updating my library to version 8.9.2, I cannot connect to docker with a unix socket. The errors I get suggest something is wrong with the new jnr version from #918.
How to reproduce
What do you expect
The client will connect to docker via the unix socket. The ping will return successfully.
What happened instead
The ping fails with an exception. See stack trace below.
Software:
docker version
Full backtrace
The text was updated successfully, but these errors were encountered: