Expected Behaviour:
Upgraded Ubuntu from 18.04 LTS to 20.04 LTS and expected Pi-hole to work.
Actual Behaviour:
Pi-hole GUI showed DNS service not running and FTL service not running
References:
There are a few similar reports that helped track down the problems.
- PiHole not working after upgrading Ubuntu Server from 18.04 to 20.04
- https://www.reddit.com/r/pihole/comments/g86xo8/after_ubuntu_2004_upgrade_unable_to_start_dns/
Fix:
In no particular order, I did the following to get everything running again. Main issues were a clash with DNS services as a result of the upgrade and package name conflicts with PHP.
Upgraded Pi-hole
Ubuntu 20.04 comes with PHP 7.4 in the repo, but there is a mismatch with the names that Pi-hole expects and what is in the repo. To fix it, edit the basic-install.sh script before running it. On line 250, change the reference from "${phpVer}-xml" to "php-xml". This will allow the install to complete
Disabled the systemd-resolved stub listener
Systemd will start a local DNS stub client that runs on 127.0.0.53:53 which will prevent FTL from starting. To disable it:
- sudo nano /etc/systemd/resolved.conf
- Add the line: DNSStubListener=no
- sudo systemctl restart systemd-resolved
Restarted pihole-FTL
- Confirm that nothing is running on port 53: sudo ss -tulpn
- Start FTL: sudo pihole-FTL
You shouldn't need to run FTL as root, but I was hitting permission issues with the log file. Once you reboot, Pi-hole will run under the user pihole.
DNS Masq
I also removed the symlink for dnsmasq, but I'm not sure if that was actually necessary:
sudo rm /etc/dnsmasq.d/lxd