Open vito-c opened 8 years ago
I am having this same problem current with docker for mac:
OS X EL CAPITAN 10.11.5:
docker --version Docker version 1.12.0-rc4, build e4a0dbc, experimental
`$ docker run -d --net=host -e MESOS_PORT=5050 -e MESOS_ZK=zk://127.0.0.1:2181/mesos -e MESOS_QUORUM=1 -e MESOS_REGISTRY=in_memory -e MESOS_LOG_DIR=/var/log/mesos -e MESOS_WORK_DIR=/var/tmp/mesos -v "$(pwd)/log/mesos:/var/log/mesos" -v "$(pwd)/tmp/mesos:/var/tmp/mesos" mesosphere/mesos-master:0.28.0-2.0.16.ubuntu1404 cac9856dff14be117fab05d173c2425c354704ecab49b625c4fd9058aeb91458
docker logs cac Failed to obtain the IP address for 'moby'; the DNS service may not be able to resolve it: Temporary failure in name resolution `
Still investigating this. I even added 'moby' to /etc/hosts and can ping it in hopes to make the container happy:
$ cat /etc/hosts ... 127.0.0.1 localhost,moby ...
$ ping moby PING localhost (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.048 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.118 ms
Same here. Mesos master can't start because hostname 'moby' does not resolve. Have a look at my docker-compose:
version: '2'
services:
zookeeper:
image: netflixoss/exhibitor:1.5.2
network_mode: 'host'
mesosmaster:
image: mesosphere/mesos-master:1.0.1-rc1
environment:
- MESOS_PORT=5050
- MESOS_ZK=zk://127.0.0.1:2181/mesos
- MESOS_QUORUM=1
- MESOS_REGISTRY=in_memory
- MESOS_LOG_DIR=/var/log/mesos
- MESOS_WORK_DIR=/var/tmp/mesos
volumes:
- './mesos/log:/var/log/mesos'
- './mesos/tmp:/var/tmp/mesos'
network_mode: 'host'
❯ docker-compose up zookeeper ... ❯ docker-compose up mesosmaster Starting mesos_mesosmaster_1 Attaching to mesos_mesosmaster_1 mesosmaster_1 | WARNING: Logging before InitGoogleLogging() is written to STDERR mesosmaster_1 | I0903 21:50:15.317561 1 main.cpp:263] Build: 2016-08-12 20:49:51 by ubuntu mesosmaster_1 | I0903 21:50:15.317672 1 main.cpp:264] Version: 1.0.1 mesosmaster_1 | I0903 21:50:15.317677 1 main.cpp:267] Git tag: 1.0.1-rc1 mesosmaster_1 | I0903 21:50:15.317682 1 main.cpp:271] Git SHA: 3611eb0b7eea8d144e9b2e840e0ba16f2f659ee3 mesosmaster_1 | Failed to obtain the IP address for 'moby'; the DNS service may not be able to resolve it: Name or service not known mesos_mesosmaster_1 exited with code 1
This seems to be an issue with Docker for mac. I could start the container on linux.
Docker for Mac issue.
Fix: tell the xhyve VM how to resolve 'moby'.
Inside the VM:
echo 172.17.0.1 moby >> /etc/hosts
Note: this is the IP address for interface docker0.
ip route | grep docker0 | awk '{print $NF}'
You can get a shell into the VM via:
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
Or use this one-liner:
docker run -it --rm -v /:/vm-root alpine:edge /bin/sh -c "echo 172.17.0.1 moby >> /vm-root/etc/hosts"
Steps To Reproduce:
Actual Result: Mesos slave and mesos master both run and exit with this result