fabric8io / fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
http://fabric8.io/
1.76k stars 504 forks source link

DNS issue with accessing docker on Vagrant via DOCKER_HOST=tcp://vagrant.f8:2375 #4634

Open tonswieb opened 9 years ago

tonswieb commented 9 years ago

Hi,

I followed the getting started on Vagrant. I have set the environment variable DOCKER_HOST to "tcp://vagrant.f8:2375" as described in http://fabric8.io/guide/getStarted/vagrant.html so I can run docker commands directly on OS X. Instead of SSH into the Vagrant VM.

Only when doing a docker ps I am getting the error: FATA[0000] Get http://vagrant.f8:2375/v1.18/containers/json: dial tcp: lookup vagrant.f8: no such host. Are you trying to connect to a TLS-enabled daemon without TLS?

Looks like the hostname resolution does not work in combination with the docker commands. Loading http://vagrant.f8:2375/v1.18/containers/json directly into the browser works fine. So DNS resolving seems to be working fine. In the browser at least.

When I change the environment variable to "tcp://172.28.128.4:2375" then the docker commands work as expected. Is this a bug in docker which ignores de landrush DNS resolver on OS X? Or do I need to add some additional configuration for docker?

The dcoker version I am using: Client version: 1.6.2 Client API version: 1.18 Go version (client): go1.4.2 Git commit (client): 7c8fca2 OS/Arch (client): darwin/amd64

Fabric8: origin/master Vagrant: v1.7.4 VirtualBox: v4.3.0

Regards,

Ton

rawlingsj commented 9 years ago

This sounds similar to another issue we have. https://github.com/fabric8io/fabric8/issues/4294#issuecomment-131717283

Does setting the following help?

export GEM_HOME=~/.vagrant.d/gems
gem uninstall celluloid -v 0.16.1
gem install celluloid -v 0.16.0
tonswieb commented 9 years ago

I already applied the downgrade of v0.16.0, because I run into similar problems as described in #4294. So downgrading to v0.16.0 does not solve this issue.

The DNS resolving of Landrush works fine now. It looks like docker is ignoring the /etc/resolver/f8 extension of Landrush? Resolving of DNS in Firefox works which shows that Landrush is running ok and the DNS resolver extension in /etc/resolver/f8 is configured correctly.