Name resolution failing for links

Containers are failing to resolve links within the container.

The workaround I’ve found is to uninstall docker for mac from the preferences menu. Download a fresh copy from https://docs.docker.com/docker-for-mac/ and install. The reinstalled docker container now resolves links as expected.

The same problem happened on a coworker’s computer, so now I’ve seen this issue twice.

Expected behavior

docker-compose up

#get into a container with a link defined by docker-compose
user@host:~ $ docker exec -it 8c7a797612e4 /bin/bash
root@8c7a797612e4:/# ping linked-app
PING linked-app (172.17.0.16): 48 data bytes
56 bytes from 172.17.0.16: icmp_seq=0 ttl=64 time=0.244 ms

Actual behavior

user@host:/tmp/tmp/20160630-135050$ docker exec -it 5260b43b8afa /bin/bash
root@5260b43b8afa:/# ping linked-app
ping: unknown host

Information

All diagnostics showed [OK] (but I did not copy and paste the window before reinstalling)

OS X 10.11.5

Steps to reproduce the behavior

Unknown

2 Likes

This problem has recurred on my computer. I will see if I can figure anything out while it is in the bad state.

diagnostic summary:

Docker for Mac: version: mac-v1.12.0-beta17
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160630-233405.tar.gz
[OK] docker-cli
[OK] app
[OK] menubar
[OK] virtualization
[OK] system
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux

I find that there’s too much personal/business information inside of the diagnostic logs and I can’t upload them. However I’m willing to upload portions or redacted data.

These vmnetd error messages look like they might be related:

Jun 30 23:50:25 devi Docker[com.docker.slirp][97012] : Created instance tcp:0.0.0.0:3002:tcp:172.17.0.16:80
Jun 30 23:50:25 devi Docker[com.docker.osxfs][97011] : Creating resource Entry(d348644c0ecae0195988831cea8e9d5dd547d89e6fd01a7ea87b329f5bef3173)
Jun 30 23:50:25 devi Docker[com.docker.osxfs][97011] : Write offset=0 data=[d348644c0ecae0195988831cea8e9d5dd547d89e6fd01a7ea87b329f5bef3173:/Users/user/co/docker/repos/myapp] to file
Jun 30 23:50:25 devi Docker[com.docker.osxfs][97011] : Volume.start d348644c0ecae0195988831cea8e9d5dd547d89e6fd01a7ea87b329f5bef3173 (paths = [/Users/user/co/docker/repos/myapp])
Jun 30 23:50:25 devi Docker[com.docker.osxfs][97011] : Created instance d348644c0ecae0195988831cea8e9d5dd547d89e6fd01a7ea87b329f5bef3173
Jun 30 23:50:26 devi Docker[com.docker.slirp][97012] : Creating resource Entry(tcp:0.0.0.0:4001:tcp:172.17.0.17:443)
Jun 30 23:50:26 devi Docker[com.docker.slirp][97012] : Write offset=0 data=[tcp:0.0.0.0:4001:tcp:172.17.0.17:443] to file
Jun 30 23:50:26 devi Docker[com.docker.slirp][97012] : attempting a best-effort bind of ::1:4001
Jun 30 23:50:26 devi Docker[com.docker.slirp][97012] : Created instance tcp:0.0.0.0:4001:tcp:172.17.0.17:443
Jun 30 23:50:26 devi Docker[com.docker.slirp][97012] : Creating resource Entry(tcp:0.0.0.0:3001:tcp:172.17.0.17:80)
Jun 30 23:50:26 devi Docker[com.docker.slirp][97012] : Write offset=0 data=[tcp:0.0.0.0:3001:tcp:172.17.0.17:80] to file
Jun 30 23:50:26 devi Docker[com.docker.slirp][97012] : attempting a best-effort bind of ::1:3001
Jun 30 23:50:26 devi Docker[com.docker.slirp][97012] : Created instance tcp:0.0.0.0:3001:tcp:172.17.0.17:80
Jun 30 23:50:57 devi kernel[kern][0] : process com.docker.hyper[97017] caught causing excessive wakeups. EXC_RESOURCE supressed due to audio playback
Jun 30 23:51:03 devi Docker[com.docker.vmnetd][97081] : EOF reading packet from Unix domain socket: closing
Jun 30 23:51:03 devi Docker[com.docker.slirp][97012] : server loop caught (Failure “Caught EOF on underlying FLOW”): no further requests will be processed
Jun 30 23:51:03 devi Docker[com.docker.vmnetd][97081] : Failed to read hello from client

I am having a very similar problem. This was in my syslog:

Jul  1 12:58:26 Macbook Docker[13667]: Creating resource Entry(tcp:0.0.0.0:6379:tcp:172.17.0.2:6379)
Jul  1 12:58:26 Macbook Docker[13667]: Write offset=0 data=[tcp:0.0.0.0:6379:tcp:172.17.0.2:6379] to file
Jul  1 12:58:26 Macbook Docker[13667]: attempting a best-effort bind of ::1:6379
Jul  1 12:58:26 Macbook Docker[13667]: Created instance tcp:0.0.0.0:6379:tcp:172.17.0.2:6379
Jul  1 12:58:26 Macbook Docker[13667]: Creating resource Entry(tcp:0.0.0.0:10001:tcp:172.17.0.3:10001)
Jul  1 12:58:26 Macbook Docker[13667]: Write offset=0 data=[tcp:0.0.0.0:10001:tcp:172.17.0.3:10001] to file
Jul  1 12:58:26 Macbook Docker[13667]: attempting a best-effort bind of ::1:10001
Jul  1 12:58:26 Macbook Docker[13667]: Created instance tcp:0.0.0.0:10001:tcp:172.17.0.3:10001
Jul  1 12:58:30 Macbook Docker[13667]: server loop caught (Failure "Caught EOF on underlying FLOW"): no further requests will be processed
Jul  1 12:58:30 Macbook Docker[15427]: EOF reading packet from Unix domain socket: closing
Jul  1 12:58:30 Macbook Docker[15427]: Failed to read hello from client
Jul  1 12:58:39 Macbook Docker[13667]: TCP 104.239.220.248:80 > 192.168.65.2:47910 proxy failed with flow proxy b: Connection refused
Jul  1 12:59:43 Macbook Docker[13667]: TCP 198.105.244.24:6379 > 192.168.65.2:37704 rejected: Socket.TCPV4.connect_v4 198.105.244.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 12:59:58 Macbook Docker[13667]: TCP 198.105.244.24:6379 > 192.168.65.2:37704 rejected: Socket.TCPV4.connect_v4 198.105.244.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:00:14 Macbook Docker[13667]: TCP 198.105.244.24:6379 > 192.168.65.2:37704 rejected: Socket.TCPV4.connect_v4 198.105.244.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:00:46 Macbook Docker[13667]: TCP 198.105.244.24:6379 > 192.168.65.2:37704 rejected: Socket.TCPV4.connect_v4 198.105.244.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:00:58 Macbook Docker[13667]: TCP 198.105.254.24:6379 > 192.168.65.2:59194 rejected: Socket.TCPV4.connect_v4 198.105.254.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:01:01 Macbook Docker[13667]: TCP 198.105.254.24:6379 > 192.168.65.2:59194 rejected: Socket.TCPV4.connect_v4 198.105.254.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:01:05 Macbook Docker[13667]: TCP 198.105.254.24:6379 > 192.168.65.2:59194 rejected: Socket.TCPV4.connect_v4 198.105.254.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:01:14 Macbook Docker[13667]: TCP 198.105.254.24:6379 > 192.168.65.2:59194 rejected: Socket.TCPV4.connect_v4 198.105.254.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:01:30 Macbook Docker[13667]: TCP 198.105.254.24:6379 > 192.168.65.2:59194 rejected: Socket.TCPV4.connect_v4 198.105.254.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:02:02 Macbook Docker[13667]: TCP 198.105.254.24:6379 > 192.168.65.2:59194 rejected: Socket.TCPV4.connect_v4 198.105.254.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:02:18 Macbook Docker[13667]: TCP 198.105.244.24:6379 > 192.168.65.2:37718 rejected: Socket.TCPV4.connect_v4 198.105.244.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:02:25 Macbook Docker[13667]: TCP 198.105.244.24:6379 > 192.168.65.2:37718 rejected: Socket.TCPV4.connect_v4 198.105.244.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:02:33 Macbook Docker[13667]: TCP 198.105.244.24:6379 > 192.168.65.2:37718 rejected: Socket.TCPV4.connect_v4 198.105.244.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:02:49 Macbook Docker[13667]: TCP 198.105.244.24:6379 > 192.168.65.2:37718 rejected: Socket.TCPV4.connect_v4 198.105.244.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:03:21 Macbook Docker[13667]: TCP 198.105.244.24:6379 > 192.168.65.2:37718 rejected: Socket.TCPV4.connect_v4 198.105.244.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:03:33 Macbook Docker[13667]: TCP 198.105.254.24:6379 > 192.168.65.2:59198 rejected: Socket.TCPV4.connect_v4 198.105.254.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")
Jul  1 13:03:36 Macbook Docker[13667]: TCP 198.105.254.24:6379 > 192.168.65.2:59198 rejected: Socket.TCPV4.connect_v4 198.105.254.24:6379: Lwt_unix.connect: caught Unix.Unix_error(Unix.ETIMEDOUT, "connect", "")

I believe I’m having a related issue. Using a node server inside I docker that is making multiple requests (to the same server) . The node server is running a slack chat bot.

info: Failed to update message :frowning: { Error: getaddrinfo EAI_AGAIN slack.com:443
at Object.exports._errnoException (util.js:953:11)
at errnoException (dns.js:33:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:79:26)
code: ‘EAI_AGAIN’,
errno: ‘EAI_AGAIN’,
syscall: ‘getaddrinfo’,
hostname: ‘slack.com’,
host: ‘slack.com’,
port: 443 }

This is still happening to me intermittently with Docker for Mac 1.12.0-rc3-beta18 (build: 9996). It seems like restarting Docker for Mac now clears it up, though (as opposed to having to blow away the installation entirely).

This is happening consistently for me (and has been for the last month - I’ve been left to use a much older version of Docker for Mac in the mean time). I’m going to try to uninstall and reinstall.

This problem has not reproduced since I upgraded to docker-compose file format version 2