DNS failure on Ubuntu 18.04.01 when updating Pi-Hole to V4.1

I just rebooted and had no DNS at all until I edited resolv.conf to include 127.0.1.1. The file had reverted to 127.0.0.1. Pihole still doesn't work and this is getting frustrating. Everything worked fine in 4.0. I tried reverting to it a couple of days ago, and it no longer worked. What did the upgrade to 4.1 break to cause this?? I don't want to have to edit resolv.conf every time I boot!

dnsmasq still appears to be running on port 53, and sudo killall dnsmasq just makes it restart with a different pid.

No reply after 3 days??

I downgraded to 3.2.1 and got it working after researching why port 53 was bound to dnsmasq even after I had uninstalled it.

Too bad your program broke DNS on my computer without warning. I guess that means I'll never be able to upgrade to 4.1, unless someday you guys will figure out what you did wrong.

This is not a Pi-Hole problem. Something on the Pi-Hole host platform is/was causing dnsmasq to run. With V4 and later, dnsmasq is embedded in pihole-FTL and dnsmasq cannot run on port 53 at the same time. When you downgraded to V 3.2.1, dnsmasq does run as a process.

It is likely that whatever local changes you made to your system to get V4.0 to work may have been undone during the 4.1 update, so you would need to restore thost local changes to get V4.1 working.

As I said originally, the problem is in the 4.1 upgrade. I didn't have to do a thing to make 4.0 work. It worked flawlessly until I upgraded Pihole.

You could save your settings and do a fresh install of Pi-Hole. That may resolve whatever configuration problem exists.

I can't help but wonder if the problems with the Docker image are a symptom of the same underlying issue? In both cases, things worked fine with 4.0, and are broken with 4.1.

Save what settings? If I didn't change any settings, what settings would I save?? I have tried installing pihole from scratch several times.

Black list, white list, regex list. Those are typically modified by users.

I didn't customize any of those so I don't care if they get set to defaults. Like I say, reinstalling doesn't fix anything.

Have you fixed this problem?

I fixed it for downgrading to 3.2.1. I haven't tried it with 4.0 yet.

The fix for downgrading to V3 will leave dnsmasq running, since V3 uses dnsmasq. To get 4+ running successfully, dnsmasq will need to be stopped so pihole-FTL can properly bind to port 53. The snippet from a debug log below (4.1 on Stretch on Pi) shows the port mapping:

*** [ DIAGNOSING ]: Ports in use
[*:80] is in use by lighttpd
[*:80] is in use by lighttpd
[*:53] is in use by pihole-FTL
[*:53] is in use by pihole-FTL
[127.0.0.1:4711] is in use by pihole-FTL
[[::1]:4711] is in use by pihole-FTL

Yes, I understand this. I had to reinstall dnsmasq for the 3.2.1 downgrade. I expect I will have to uninstall it again to when I go to 4.0, and stop the network manager from using it before FTL can take over port 53. I didn't have to do that when I upgraded to 4.0 the first time, but I think it will be necessary now. If I can make 4.0 work, I think I will be able to make 4.1 work. At least that is my hope.

If there were any system updates for your Ubuntu install between when you installed Pi-Hole V4 (released early August) and this month when V4.1 was released, that could be causing the problem.

Right. Even though the purge said dnsmasq was no longer intsalled, the network manager still had a lock on it somehow. When I stopped network manager from using dnsmasq is when 3.2.1 started working. I am hoping this is what kept the 4.1 upgrade from working and will be the solution to the problem. I will start upgrading pihole when I have a clear block of time for troubleshooting in case it doesn't work.

That's always a possibility.

I was able to switch to the master branch and upgrade to 4.1.

The upgrade ran smoothly without intervention and everything appears to be working. The steps I had to take in order for the 3.2.1 downgrade work apparently made the upgrade to 4.1 work this time. This is what I had to do:

1. Edit /etc/NetworkManager/NetworkManager.conf by commenting out dns=dnsmasq. **
2. sudo service network-manager restart
3. sudo service networking restart

After that, FTL was able to bind to port 53 and DNS became functional.

** I had already purged dnsmasq. At this point I'm not sure if that is actually necessary.

I found the solution here: linux mint - How to disable dnsmasq? - Unix & Linux Stack Exchange

Hopefully the ordeal and hours spent in finding this solution will help the other 18.04.1 users who are experiencing problems after upgrading to 4.1. The cause of the problem is still unknown, but I'm assuming it was caused by a software update to Ubuntu.

Glad it's working for you.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.