I've been having trouble recently with my network in that, at "random" times, I will lose DNS lookup capability (and thus, a slew of other resulting problems).

When this happens, I usually noticed it via web-browsing, but since I wanted to capture precise times this would occur, I wrote a simple cronjob to (every minute) run a DNS lookup of 'google.com' and log whenever DNS would fail.

As you can see, in each instance, NetworkManager (for whatever reason, it keeps updating very frequently?) will SIGTERM the old dnsmasq then try to spawn a new one. However, when my problem occurs, dnsmasq is delayed in exiting, thus keeping the socket alive, thus preventing the new dnsmasq from acquiring it ... and so the new dnsmasq dies, and moments later, so does the old dnsmasq.

Anyone else think this could be a bug?

I can't really say what new changes I've done to my system, since this is a new computer, and I've done a LOT of work to it, but nothing network related.

I found on this forum post that a user can disable dnsmasq; I'm tempted to try that if I can't solve my problem otherwise, but I figured I'd post this here to see if anyone has any suggestions / ideas / similar experiences.

Thanks for the tip . That solution seems similar to a few other things I've read, but it seems to just be a workaround by making dnsmasq NetworkManager-independent?

Is this the best route to go?

I'm also wondering if this is something others have experienced: if the problem is a race-condition of sorts with dnsmasq being SIGTERM'ed just in time for a new instance, this aught to be a bigger issue than just what I'm seeing.

Re: NetworkManager + dnsmasq = periodic loss of DNS

I've read quite a few posts that people are running independently; some people would say that's the only way to go. Myself, I'm partial to running things as designed but that's not always possible

You do have the option of removing Network Manager altogether and using dnsmasq but like you stated earlier you also have the option to disable dnsmasq.

I'm also wondering if this is something others have experienced: if the problem is a race-condition of sorts with dnsmasq being SIGTERM'ed just in time for a new instance, this aught to be a bigger issue than just what I'm seeing.

Agreed, you can check to see if there are any related bugs although I had quick look and didn't see any related -

Re: NetworkManager + dnsmasq = periodic loss of DNS

Originally Posted by CharlesA

The only reason to uninstall resolvconf is if you want to configure your DNS settings yourself.

Even if you want to configure DNS settings by hand it is better to leave resolvconf installed. The reason is that when resolvconf is installed, most other packages refrain from overwriting /etc/resolv.conf. To edit /etc/resolv.conf by hand when resolvconf is installed, simply remove the symbolic link at /etc/resolv.conf and put your own static file there.