{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/20335","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/20335/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/20335/comments","events_url":"https://api.github.com/repos/docker/docker/issues/20335/events","html_url":"https://github.com/docker/docker/issues/20335","id":133813623,"number":20335,"title":"Containers name resolution timed out with embedded DNS","user":{"login":"narqo","id":88045,"avatar_url":"https://avatars.githubusercontent.com/u/88045?v=3","gravatar_id":"","url":"https://api.github.com/users/narqo","html_url":"https://github.com/narqo","followers_url":"https://api.github.com/users/narqo/followers","following_url":"https://api.github.com/users/narqo/following{/other_user}","gists_url":"https://api.github.com/users/narqo/gists{/gist_id}","starred_url":"https://api.github.com/users/narqo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narqo/subscriptions","organizations_url":"https://api.github.com/users/narqo/orgs","repos_url":"https://api.github.com/users/narqo/repos","events_url":"https://api.github.com/users/narqo/events{/privacy}","received_events_url":"https://api.github.com/users/narqo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/group/networking","name":"group/networking","color":"F6FBFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-15T20:49:43Z","updated_at":"2016-02-15T22:42:50Z","closed_at":null,"body":"I have two docker containers started and linked via `docker-compose.yml` file:\r\n\r\n~~~\r\nversion: '2'\r\nservices:\r\n  srv1:\r\n    image: test-net\r\n    expose:\r\n      - 8000\r\n    command: python -m SimpleHTTPServer\r\n    working_dir: /tmp\r\n\r\n  srv2:\r\n    image: test-net\r\n    links:\r\n      - srv1\r\n    command: tail -f /var/log/dpkg.log\r\n\r\nnetworks:\r\n  default:\r\n    driver: bridge\r\n    driver_opts:\r\n      'com.docker.network.enable_ipv6': 'true'\r\n~~~\r\n\r\n`test-net` is a simple Ubuntu image with some additional stuff preinstalled.\r\n\r\nAfter I run `docker-compose up`, I can attach to **srv2** container (`testdockercompose_srv2_1` in my example) and it looks like everything is set as properly:\r\n\r\n~~~\r\n# cat /etc/resolv.conf\r\n\r\nsearch haze.yandex.net yandex.net yandex.ru\r\nnameserver 127.0.0.11\r\nnameserver <my:host:system:ipv6:dns::1>\r\noptions ndots:0\r\n\r\n# ping -w 2 127.0.0.11\r\n\r\nPING 127.0.0.11 (127.0.0.11) 56(84) bytes of data.\r\n64 bytes from 127.0.0.11: icmp_seq=1 ttl=64 time=0.090 ms\r\n64 bytes from 127.0.0.11: icmp_seq=2 ttl=64 time=0.086 ms\r\n\r\n--- 127.0.0.11 ping statistics ---\r\n5 packets transmitted, 5 received, 0% packet loss, time 3999ms\r\nrtt min/avg/max/mdev = 0.065/0.081/0.090/0.011 ms\r\n\r\n# ping -w 2 srv1\r\n\r\nPING srv1 (172.19.0.2) 56(84) bytes of data.\r\n64 bytes from testdockercompose_srv1_1.testdockercompose_default (172.19.0.2): icmp_seq=1 ttl=64 time=0.132 ms\r\n64 bytes from testdockercompose_srv1_1.testdockercompose_default (172.19.0.2): icmp_seq=2 ttl=64 time=0.114 ms\r\n\r\n--- srv1 ping statistics ---\r\n2 packets transmitted, 2 received, 0% packet loss, time 1000ms\r\nrtt min/avg/max/mdev = 0.114/0.123/0.132/0.009 ms\r\n~~~\r\n\r\nBut if I try to call name resolution for `srv1` directly via `host` of `nslookup` I get \"connection timed out\":\r\n\r\n~~~\r\n# host srv1\r\n\r\n;; connection timed out; no servers could be reached\r\n\r\n# nslookup srv1\r\n\r\n;; Got recursion not available from 127.0.0.11, trying next server\r\n;; connection timed out; no servers could be reached\r\n~~~\r\n\r\nAt the same time name resolution works fine if I specify DNS server explicitly:\r\n\r\n~~~\r\n# nslookup srv1 127.0.0.11\r\n\r\nServer:\t\t127.0.0.11\r\nAddress:\t127.0.0.11#53\r\n\r\nNon-authoritative answer:\r\nName:\tsrv1\r\nAddress: 172.19.0.2\r\n~~~\r\n\r\nThis leads to HTTP timeouts during calls to linked containers. A simple curl call to `http://srv1:8000` takes 15 secs, while call to `http://172.19.0.2:8000` is instant.\r\n\r\nMy host system is IPv6-only Linux with docker 1.10.1 installed.\r\n\r\n~~~\r\n› docker version\r\n\r\nClient:\r\n Version:      1.10.1\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   9e83765\r\n Built:        Thu Feb 11 19:27:08 2016\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.10.1\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   9e83765\r\n Built:        Thu Feb 11 19:27:08 2016\r\n OS/Arch:      linux/amd64\r\n\r\n› sudo docker info\r\n\r\nContainers: 9\r\n Running: 2\r\n Paused: 0\r\n Stopped: 7\r\nImages: 88\r\nServer Version: 1.10.1\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 93\r\n Dirperm1 Supported: true\r\nExecution Driver: native-0.2\r\nLogging Driver: json-file\r\nPlugins:\r\n Volume: local\r\n Network: host bridge null\r\nKernel Version: 3.19.0-42-lowlatency\r\nOperating System: Ubuntu 14.04.1 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 1\r\nTotal Memory: 1.954 GiB\r\nName: var01f.vsfront.yandex.net\r\nID: YYOZ:TMTI:UE6N:6DUW:S2GP:KGNN:TN3G:CEQO:F2CA:ODQE:FRQH:Q356\r\nDebug mode (server): true\r\n File Descriptors: 33\r\n Goroutines: 54\r\n System Time: 2016-02-15T23:48:08.593476359+03:00\r\n EventsListeners: 0\r\n Init SHA1: e1042dbb0bcf49bb9da188176d9a5063cdb92a01\r\n Init Path: /usr/lib/docker/dockerinit\r\n Docker Root Dir: /var/lib/docker\r\nWARNING: No swap limit support\r\nLabels:\r\n provider=generic\r\n~~~"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/184427215","html_url":"https://github.com/docker/docker/issues/20335#issuecomment-184427215","issue_url":"https://api.github.com/repos/docker/docker/issues/20335","id":184427215,"user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T22:42:50Z","updated_at":"2016-02-15T22:42:50Z","body":"ping @sanimej  @mavenugo could you have a look at this?"}}