Pi-hole: Ubuntu 19.04 update breaks pihole

Created on 22 Apr 2019  Â·  32Comments  Â·  Source: pi-hole/pi-hole

In raising this issue, I confirm the following: {please fill the checkboxes, e.g: [X]}

How familiar are you with the the source code relevant to this issue?:

1


Expected behaviour:

Dns server to function properly

Actual behaviour:

DNS server fails

**Steps to reproduce

Attempted to update a second server to Ubuntu 19.04, same outcome.

Debug token provided by uploading pihole -d log:

20knzaf6gt!

Troubleshooting undertaken, and/or other relevant information:

Issue arose when updating to Ubuntu 19.04

  • tried to reinstall, but the dns server fails to run at the end.
  • cannot get dns server to start

Most helpful comment

Yes, #2811 has a fix that should work.

All 32 comments

Had a similar issue, mostly with lighttpd and pihole-FTL refusing to start, but I think I might have found a band aid fix for my installation of 19.04.
Based on this post here
I was able to fix lighttpd by using sudo nano /etc/lighttpd/lighttpd.conf and commenting out:
include_shell "/usr/share/lighttpd/create-mime.assign.pl" and include_shell "/usr/share/lighttpd/include-conf-enabled.pl" then adding include_shell "/usr/share/lighttpd/create-mime.conf.pl"
At this point lighttpd was working and pihole-FTL wasn't, I fixed it by removing the symlink lxd using
sudo rm /etc/dnsmasq.d/lxd
Then starting dnsmasq using sudo systemctl start dnsmasq, then stopping dnsmasq sudo systemctl stop dnsmasq and then restarting pihole-FTL with sudo service pihole-FTL restart

While this worked for me I can't guarantee this is the most efficient way for anyone else, or if it will work too. Good luck!

So does dnsmasq end up installed on the system again?

For me it did, I don't think it is necessary thought. I just wanted to outline everything I did incase it makes a difference somehow.

Edit: I just uninstalled dnsmasq and things went south really fast for some reason, running pihole -r seems to have fixed it with a reboot. Up and running perfectly now.

I don't think it is necessary though

dnsmasq is not necessary and should not be installed with pihole installed.

also makes me wonder if the install script checks for dnsmasq?

I don't think it does. I only installed it to make sure that I was able to use port 53 since pihole-FTL kept failing despite the port not being used. pihole -r and a reboot seems to have fixed most issues for the pihole-FTL service for me, after I figured out my lighttpd issues based on my first comment.

pihole-FTL kept failing despite the port not being used

pihole -r and a reboot seems to have fixed most issues for the pihole-FTL service for me

Please provide the last line of /var/log/pihole.log and /var/log/pihole-FTL.log after it failed so we can clear out your remaining problems.

Pihole.log is empty and logpihole-FTL.log doesn't exist

@tyrnight I updated my comment, the file you should have looked for is /var/log/pihole-FTL.log

Please also check for any similar files in the directory (like pihole-FTL.log.1) as these files are periodically rotated.

Piholelog:
Apr 24 10:40:11 dnsmasq[880]: exiting on receipt of SIGTERM

Pihole-ftl:[2019-04-24 10:39:49.675 1181] Successfully accessed setupVars.conf

Had a similar issue, mostly with lighttpd and pihole-FTL refusing to start, but I think I might have found a band aid fix for my installation of 19.04.
Based on this post here
I was able to fix lighttpd by using sudo nano /etc/lighttpd/lighttpd.conf and commenting out:
include_shell "/usr/share/lighttpd/create-mime.assign.pl" and include_shell "/usr/share/lighttpd/include-conf-enabled.pl" then adding include_shell "/usr/share/lighttpd/create-mime.conf.pl"

in lighttpd 1.4.45 (ubuntu before 19.04) we have /usr/share/lighttpd/create-mime.assign.pl
in lighttpd 1.4.53 (ubuntu 19.04) we have /usr/share/lighttpd/create-mime.conf.pl

you should change lighttpd.conf accordingly

include_shell "/usr/share/lighttpd/create-mime.conf.pl"

Using Debian, installed openssl 1.1.1 therefore had to install newer lighttpd version as in debian 9. (Rasbian)

I used sudo apt-get purge dnsmasq

I copied the /usr/share/lighttpd/create-mime.conf.pl

With cp /usr/share/lighttpd/create-mime.conf.pl /usr/share/lighttpd/create-mime.assign.pl

Run pihole -r and it works. Almost.
Says:
[i] Checking for existing FTL binary...
[✗] Downloading and Installing FTL Error: Unable to get latest release location from GitHub
[✗] FTL Engine not installed

I changed nano /etc/resolv.conf the dns to something different (like 8.8.8.8) and run pihole -up and then pihole -r (chose repair)

Then sudo reboot, everything works fine (resolv.conf is back to normal but my pi works again)

The error with ftl probably came because he tried to resolve dns with himself (dnsmasq removed, ftl not installed), so I had to change it to e.g. 8.8.8.8 to let it download

I also had issues with resolv.conf which I didn't mention since those have been happening for awhile now, and I didn't think it was related to Pihole. Running:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
Fixes my issues with resolve.conf all the time.

I am using dnscrypt-proxy which runs on a custom port on 127.0.0.1 maybe this had to do something with it?
Maybe the cp config file if lighttpd is above version would be good or just change the one line according to lighttpd version.

I mean in the pihole -r or install or whatever process. So that other users dont get the same Problem with ubuntu or debian or which distribution

Had a similar issue, mostly with lighttpd and pihole-FTL refusing to start, but I think I might have found a band aid fix for my installation of 19.04.
Based on this post here
I was able to fix lighttpd by using sudo nano /etc/lighttpd/lighttpd.conf and commenting out:
include_shell "/usr/share/lighttpd/create-mime.assign.pl" and include_shell "/usr/share/lighttpd/include-conf-enabled.pl" then adding include_shell "/usr/share/lighttpd/create-mime.conf.pl"

in lighttpd 1.4.45 (ubuntu before 19.04) we have /usr/share/lighttpd/create-mime.assign.pl
in lighttpd 1.4.53 (ubuntu 19.04) we have /usr/share/lighttpd/create-mime.conf.pl

you should change lighttpd.conf accordingly

include_shell "/usr/share/lighttpd/create-mime.conf.pl"

This did the trick for me thanks. isn`t there any way to modify the installer script?

changing the line in /etc/lighttpd.conf ->
include_shell "/usr/share/lighttpd/create-mime.conf.pl"
works for me also.

Then after every boot I need to restart the pihole-FTL-service to get it running again:
sudo systemctl restart pihole-FTL.service

Did you try to copy the file, like I mentioned? Do you have then to restart after reboot? (Try with cp /usr/share/lighttpd/create-mime.conf.pl
And
/usr/share/lighttpd/create-mime.assign.pl
In the config file. Look if one it works)
Would be interesting if this works.

i have the same issue. After the 19.04 update pihole stopped working. The web interface wasn't accessible anymore. i had configured pihole with the dns over https with the cloudflared resolver.I modified the /etc/resolv.conf with google dns so i would be able to run a pigole -r but the issue wasn't solved and lighttpd couldn't be started. I purged everything completely but still dns can't be resolved now, as the resolv file contains as nameserver 127.0.0.1 and after every reboot is getting restored. I read somewhere that the dns configuration shouldn't be done through the resolv.conf in ubuntu 19 and that there is now /etc/netplan but after i did a configuration and sudo netplan apply, the configuration can't be loaded. So now i'm stuck with the temporary fix of putting google dns in the resolv.conf until the server is rebooted. I have a second pihole installed in a raspi as a backup dns server so for the moment i'm good.Any help how to restore the network configuration on the machine or make pihole work again?I have access only through command line. thanx!

Welp, I was gonna build an Ubuntu PC to handle Pi-hole, dnscrypt-proxy, and UniFi Controller, but this kills that. _sigh_

Anyway I hope it gets fixed soon as Raspbian is downstream of Debian, where this issue apparently first appeared. (Read: this problem may cascade down to Raspberry Pis eventually.)

I had the same issue as @sesshomaru86 – broken DNS after installing-then-uninstalling on 19.04, but managed to fix it.

The nameserver 127.0.0.1 /etc/resolve.conf is coming from /etc/dhcpd.conf. The install process adds a block like this to the dhcpd.conf to ensure the server retains a static IP:

interface en01
        static ip_address=10.0.1.2/24
        static routers=10.0.1.1
        domain_name_servers=127.0.0.1

Removing that whole block–or just the last line to preserve the static IP–and rebooting the machine got things working for me again.

The dhcpd.conf changes come from the install process here: https://github.com/pi-hole/pi-hole/blob/1d43c0a2fa36ddc993db51b1751e26cbc8123fbf/automated%20install/basic-install.sh#L825

Given this is part of the install and can leave things broken, it should likely be undone as part of the uninstall script–though this will likely require reworking the way the dhcpd.conf file is edited during the install process so the uninstaller can just copy back a .orig file or something.

I've decided to just build a Debian desktop instead, since Debian 9.9 is officially supported.

I did a fresh install of Ubuntu 19.04 and had to install the previous version LTS to get it working. It's completely broken even with the suggestions I see here. I can get the DNS to start working and pinging external servers, but I still couldn't access the portal. Something breaks during the installation of Pi-Hole because it doesn't even finish the installation.

@whatanatta Does it skip or stop when it tries to install lighttpd? If not when does it quit? If lighttpd is where it stops try installing it manually and see if there are any conflicting packages on your system. I know nginx had some issues with it on mine.

@cole8888 Unfortunately, I'm not sure when it breaks during the installation on Ubuntu 19.04. After selecting the different options to install Pi-Hole, it does most of the installation before just stopping and it goes back to the command line.

This happens with a fresh install of 19.04 and nothing else installed. I can fire up a new virtual machine and do the installation on it again to see exactly where it stops if you want me to. But since I just got Ubuntu 18.04.2 LTS installed and Pi-hole operating, I won't be doing much diagnosing beyond that.

impacted by this, upgrading to 19 breaks DNS / Pihole

I don't think we even need the mime type mappings and I can't find the reason why that line is included in the configuration file. It seems to just have been added 4 years ago in a template found elsewhere. If it's not needed then we can just remove that line from the configuration file and if there are mime types that are needed for other applications they can be added to the external.conf file.

As a test I have removed the mime include_shell from my configuration and it appears to be functioning correctly.

As a test I have removed the mime include_shell from my configuration and it appears to be functioning correctly.

Awesome, thanks :) Assuming that works, does that mean Debian Buster and Ubuntu 19.04 would be officially supported at that point?

Yes, #2811 has a fix that should work.

Yes, #2811 has a fix that should work.

OK, that's great to hear!

Fixed in v4.3.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fsantiago07044 picture fsantiago07044  Â·  31Comments

emmtte picture emmtte  Â·  33Comments

Mukrosz picture Mukrosz  Â·  34Comments

silv3rr picture silv3rr  Â·  41Comments

rj45jack picture rj45jack  Â·  33Comments