[Resolved ]Recent ubuntu update causes strange DNS issue

Expected Behaviour:

Regular update of Ubuntu OS should not affect pi-hole

Actual Behaviour:

After recent update, pi-hole DNS service fails to start. Reboot doesn't help
However, restart of pi-hole will recover the DNS service (sudo systemctl restart pihole-FTL)

Debug Token:

4acp0hx49r (Just rebooted and DNS service not running.. need to change /etc/resolv.conf to upload this token)
l3bbiphzhe (Debug obtained after restart of pihole-FTL and pihole works again)

My pi-hole installation has been running smooth for few months without any issue.
Applied Ubuntu update (sudo apt-get update; sudo apt-get upgrade) today, pihole no longer runs as expected. See info below:

$ pihole restartdns
[âś“] Starting DNS service
$ pihole status
[âś—] DNS service is NOT running
$ sudo systemctl status pihole-FTL
â—Ź pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; bad; vendor preset: enabled)
Active: active (exited) since Tue 2019-06-04 20:09:07 HKT; 8min ago
Docs: man:systemd-sysv-generator(8)
Process: 603 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Jun 04 20:08:56 xxxx systemd[1]: Starting LSB: pihole-FTL daemon...
Jun 04 20:08:57 xxxx pihole-FTL[603]: Not running
Jun 04 20:09:07 xxxx su[1228]: Successful su for pihole by root
Jun 04 20:09:07 xxxx su[1228]: + ??? root:pihole
Jun 04 20:09:07 xxxx su[1228]: pam_unix(su:session): session opened for user pihole by (uid=0)
Jun 04 20:09:07 xxxx pihole-FTL[603]: dnsmasq: unknown interface eth0
Jun 04 20:09:07 xxxx systemd[1]: Started LSB: pihole-FTL daemon.
Jun 04 20:11:10 xxxx systemd[1]: Started LSB: pihole-FTL daemon.
Jun 04 20:17:15 xxxx systemd[1]: Started LSB: pihole-FTL daemon.

After restart of service (sudo systemctl restart pihole-FTL), everything works again!
I don't know what caused this strange behavior? A simple crontab that restart of pihole-FTL can temporarily fixes this issue but wonder if there is a resolution.

Thanks, pi-hole team!

It might be that the Ubuntu update somehow activated below:

https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

Check your current interface names with:

ip l

And whats configured in Pi-hole:

grep PIHOLE_INTERFACE /etc/pihole/setupVars.conf

You can disable predictable rubbish :wink: by adding below to the kernel command line:

net.ifnames=0

Ps. if P-rubbish, you could also run below one and select reconfigure to adapt to the new interface names.
Forgot to mention :wink:

pihole -r

Thanks, deHakkelaar!

In fact, I have applied both net.ifnames=0 and biosdevname=0 in /boot/cmdline.txt. command "ip l" shows eth0 and the grep shows "PIHOLE_INTERFACE=eth0"

It seems to me it is relevant to NIC name issue during booting up since dnsmasq logs shows unknown eth0.... However, after booted, NIC name is eth0. It is really strange...

1 Like

Sounds a bit like the interface is reported a bit late.
Check dmesg.
Could be driver issue.
Not sure if works but for diagnosing, you could try delay pihole-FTL a bit by editing below file:

sudo nano /etc/init.d/pihole-FTL

And squeeze in a sleep command (30 seconds just to be sure :wink: ) somewhere here:

#!/bin/bash
### BEGIN INIT INFO
# Provides:          pihole-FTL
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: pihole-FTL daemon
# Description:       Enable service provided by pihole-FTL daemon
### END INIT INFO

sleep 30

FTLUSER=pihole
PIDFILE=/var/run/pihole-FTL.pid
[..]
1 Like

Awesome tweak! It works now even after reboot :grinning:

You are right. "eth0" seems to be reported after pihole-FTl starts.

Great.
You can try lower the period oc.
And keep in mind that a Pi-hole update or repair will probably undo your changes.
Could check out Ubuntu forums if others experience same after update/upgrade.

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