-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble with domain to container resolution on OS X #73
Comments
@asbjornenge thx for pointing there. It's that article that got me started in the first place ;) Adding the DNS server to OS X Network Preferences didn't do the trick in my case though :( May I ask what your Network Prefs settings look like? Mine looks like this at the moment: thx |
@gijs yeah, looks correct to me... Did you try with only the skydns container ip? Don't know if I have any other tips I'm afraid. Everything looks correct... weird.. |
@gijs oh, hang on... might it be that your vm can't talk to the network?
Can you dig @8.8.8.8 from the host? And also from within a container? |
On 8 Sep 2014 12:42, "asbjornenge" notifications@github.com wrote:
This is probably a red herring.
But this is still a good thing to check.
|
Hmmm something magical happened...
And this showed in
And voila! It works in the browser in OS X... out of the blue... Now I'm curious if container-to-container dns is working. thx so far, I'll close this for now. ps. I could ping and dig 8.8.8.8 both from within a container and from the CoreOS VM.. not sure about that error indeed. |
I left it alone for an hour or so, and then the browser window that I opened didn't respond anymore. Had to run Something to do with timeouts/ttls? This is a bit fragile.... |
Strange....someone (maybe me or someone else needs to port skydns2 to
|
A note on curl that just hit me today... curl by default uses (only?) ipv6. So I need to tell it to use ipv4 in order to get it working...
|
This whole issue seems to be related to how operating systems handle dns lookups. It seems they are always querying both A and AAAA records. How they handle the results can vary between OS and application. Especially when there are only A results and no AAAA results present some systems behave, in lack of a better word; surprisingly. Now, if docker had full ipv6 support, we could populate those records and solve this problem. But for now we are in a pickle. Disabling ipv6 or prioritising ipv4 dns queries for all containers is a huge PITA. I've been fiddling with my own dns server for discovery over here. I recently added a --ipv4-only flag that will return A records even for AAAA queries. This actually seems to solve the problem. I'm not a DNS expert, so I don't know if it's appropriate or not, but it does work! 🚀 @miekg is this totally bonkers? Or a valid workaround while waiting for ipv6...? |
Pretty amazed that --ipv4-only works at all.... What could be an issue here is that skydns (I must double check this) returns an NXDOMAIN for AAAA, which means a A lookup is useless as the node does not exist. It should return NODATA so that a follow-up A lookup is done. Is a possible to show 'dig A' and 'dig AAAA' responses here? |
@miekg AHA! That makes sense... I will try returning NODATA for the AAAA.
And none of the distributions I have tried are complaining anymore. Still, that NODATA is probably the correct fix. Thanks! |
This being skydns(1) it should still do the right thing. I'm pretty sure skydns2 does so. Anyway I will work on getting skydock into skydns2. |
@miekg no sorry, this was rainbow-dns responses (with --ipv4-only). I don't have skydock set up anymore... But a 👍 for gettings skydns2 into skydock |
Hi,
I'm having trouble connecting to containers by hostname from the OS X side.
Is there anything I'm doing wrong here? Any help/ideas greatly appreciated!
Thx! Gijs
The following is what I know so far.
Running
dig
from the OS X terminal replies as such:$ dig elasticsearch.dev.docker.dev
And I can query the container using
curl
using the IP address:$ curl 172.17.0.13:9200
which returns:
But using
curl
to query by domain...$ curl http://elasticsearch.dev.docker.dev:9200
...gives:
Details:
172.17.0.3
and172.17.42.1
alongside the DHCP-provided IP's to the DNS Servers in OS X's System Preferences underNetwork > Advanced
/etc/resolv.conf
:$ sudo route -n add -net 172.17.0.0 10.2.0.10
$ docker logs skydns
:$ docker logs skydock
:$ curl -XGET http://172.17.0.10:8080/skydns/services/
gives:
$ scutil --dns
:...however, the website did continue to work (wikipedia in this case)
The text was updated successfully, but these errors were encountered: