-
Notifications
You must be signed in to change notification settings - Fork 672
WeaveDNS problems and suggestions #484
Comments
@richtera first of all, thank you very much for your feedback! |
So the Mesos/Marathon integration you are referring to has not been tested with WeaveDNS just yet, I'm not surprised it didn't quite work out of the box. I am going to take a look into this and will let you know if there is any simple way to fix it. |
@richtera There is the new |
@richtera could you provide output of |
I am currently using 0.9 |
PLEASE IGNORE. This was due to an unrelated network issue.
|
I have just published new images to the dockerhub, so you can get the latest version by grabbing the latest weave script and running Note however that --fallback may well go away and be replaced with a more general mechanism. |
PARTIALLY RESOLVED: This is because the weave-dns docker doesn't have access to the DNS in the hosting environment's private 10.2 network. Seems weird, but using 8.8.8.8 as the DNS does route correctly. Seems close but not quite working.
The two IPs to DNS are working:
But dig into the new DNS doesn't seem to fallback correctly.
versus
The weavedns's log just says
Unfortunately the logs of weavedns don't report what kinds of fallbacks were sent to it to prove it got them. But when I change the command line to say --forward (which is obviously wrong) then it will log it doesn't understand forward. So it seems to be getting the arguments and understanding them.
In my case, so I have not even forced all dockers to use weave-dns. |
@richtera I'm not sure, but maybe it could have something to do with the way you use the If it fails, could you try again with a safe fallback server, like Google's? Something like:
As @rade said, this will not be the prefered solution for this problem, but in the meantime... |
Changing the fallback to use = doesn't change anything. I am also pretty sure it's parsing things because initially I tried "10.2.0.112:53,10.2.0.133:53" and it complained about the IP:PORT not being parsed correctly.
So it's definitely parsing the string I pass with and without the =. Well since /etc/resolv.conf could in theory contain the fallback DNS's it could just use if from there, but --fallback would be nice if the docker setup is configured to automatically point to the weave-dns on each machine. This would cause docker run inside of weave to launch weave-dns point to itself. Tried google.s 8.8.8.8:53 as well with the same problems. |
Something is not right though. I do see...
when I put in garbage to the fallback option, but I don't see
in the log? And I don't get any other errors. How do I manually build the weavedns docker and point to it? |
The 8.8.8.8 does the trick. After a whole bunch of trying I figured out how to enable debugging which told me on one of my machines nothing was working and all DNS requests were timing out using fallback. |
Startup with nodes configured with weave and weavedns is also going to be hard. |
use |
YES! That works.
And.
leads to
and
But unfortunately this wasn't EASY :-). |
Well the mDNS muticast is causing me problems though. I never see the records being forwarded to another machine. It's absolutely a problem on my side except I am not quite sure how to setup routing of the fake DNS partition of the network. |
you shouldn't have to do any network configuration to get weaveDNS to work, since it communicates over the weave network. Make sure you have adhered to the instructions for weave launch-dns, in particular the requirement to give each weaveDNS instance "its own, unique, IP address, in a subnet that is a) common to all weaveDNS containers, b) disjoint from the application subnets, and c) not in use on any of the hosts." If you still can't get things to work, check the logs of the local and remote weaveDNS containers ( |
My setup is as follows:
|
Suddenly started working. I didn't change anything but it's now working. |
The connection between the dns servers seems to come and go? I did place each DNS server into a 254 subnet and for a while they can reach each other and the machines can reach the DNS servers on the other machines. But then after while they no longer communicate; I think it's a routing problem where after a while it forgets the route it initially used. |
Hmm. Could be an ARP issue. How did you observe the (lack of) communication between weaveDNS servers? |
Initially I can do dns request using dig from any machine to any of the dns servers running on each of the hosts. Then after a while I canno longer do that. |
Ok all this happens because of /etc/default/docker containing
for each host n. Without these the dns works. I think there is an issue when weavedns runs within a container which is already in the cidr network and it adds a second interface into the same network. |
We are working on automatic allocation of IPs across the whole network, which is issue #22. |
What's interesting is that using --fixed-cidr will cause docker to pick an available IP. Couldn't this be leveraged? Since each host machine could be given a different --fixed-cidr all instances would automatically get a unique IP. The only workaround we'd need is to make sure weavedns can live in an environment that has docker using --fixed-cidr setup and have the weave command detect it. |
The Also we would want to be able to allocate an IP for WeaveDNS in one subnet and IPs for other containers in another subnet, on the same machine. |
also, the cidr determines the subnet. containers can only communicate when on the same subnet. Which conflicts with using the cidr to carve out ranges per docker host. |
Makes sense although making fixed-cidr work as an immediate feature might allow people to jump in an build some clouds :). But I agree a dhcp type solution would be better and it could auto populate the dns as well. I am just kind of stuck; I am trying to deploy a proof of concept application group that includes cassandra, elasticsearch and datomic which all use a gossip kind of approach making them very unhappy with a port redirecting haproxy solution. |
Surely all weave application containers will end up with two interfaces. with overlapping CIDRs. That is bad. |
Only if you start them with weave run. If you start them with docker run they will end up in the weave network with a unique IP. At least that's what I was seeing. |
Ah, I see. So presumably you also tell docker to use the weave bridge. |
but then I don't understand how you get the weave containers to have a /16 CIDR. |
ah, you don't. you rely on the default route. This is all well uncharted territory. |
Yea the config is a little further up in the thread
Edit /etc/default/docker
Then execute
So the only thing that's giving me a hard time here is the weavedns. |
With the new version of docker running under ubuntu I am seeing dnsmasq also taking up port 53 in some places. I haven't narrowed down whether this is another variable now causing additional problems, but just FYI. |
Is there anything left to investigate here that isn't covered by other issues? |
Is the port 53 thing covered anywhere? This might be a new docker feature which conflicts with the weaveDNS listener. |
The port won't conflict. weaveDNS runs in a container, not on the host. |
But that's where dnsmasq listens. I think the latest 1.6 docker has some kind of dns forwarder instead of updating /etc/resolv.conf as I understand. |
Weavedns listens on port 53 of the weavedns container IP. It does not listen on port 53 of the host. |
btw, any pointers to info about this looming docker 1.6 dnsmasq introduction? |
I just pulled rc1 from docker.io and it prevented me from running the weaveDNS on port 53 so I ran it on 52. Not sure if this is something as part of an updated lxc release or docker itself. I just saw a process called dnsmaq listening on port 53. So I don't have a lot of extra info, since I was tied up with other stuff for the last few days. |
I've just tried docker 1.6rc3 and encountered no problems. |
Ok, then I'll just close this. Maybe it's part of my setup but I am just using plain ubuntu boxes. |
I do have a dnsmasq running, which is part of the stock ubuntu setup. It doesn't conflict with weavedns for the reasons I explained above. I wonder whether in your weave experiments you somehow managed to launch the weavedns container in the host network namespace, or attempted to publish the container's port 53. |
I did have marathon and mesos running which I suppose could have detected weaveDNS and decided to establish an haproxy entry, but normally only mesos tasks are registered inside of haproxy. Other than that I didn't specify arguments when launching weavedns to specify networking options. When I changed the listen port to 52 it worked normally. |
I was able to get a weave network setup, but I would like to use it within a higher level mesos and marathon abstraction. In order to have the weavedns hooked into the system I set the docker -d options to include --dns . This works good for .weave.local lookups, but has a problem generating a loop within weavedns since it sees it's self when the weavedns container launches. When weavedns launches it should probably ignore seeing it's own IP number as a lookup dns in resolve.conf. And it should probably be able to take additional --dns command line arguments so we can point it to external dns lookups. I was thinking that if docker is setup to automatically start new dockers with --dns then weave launch-dns --dns --dns should setup weavedns to forward things outside of the local dns to those remote dns servers.
I like the weave command line, but ultimately there should be a better integration with docker or mesos to make weave and weavedns automatically register things in weavedns. Using mesos-dns is not quite possible, since mesos-dns will register the hostmachine:haproxyport which is redirected to the instance:port. Since in this scenarios we want to register instance:port in DNS. Ideally weavedns should also support SRV records for all the ports each docker publishes.
The text was updated successfully, but these errors were encountered: