Install fails on Ubuntu Desktop 18.4

Please follow the below template, it will help us to help you!

Running the install script and it stops at Starting dnsmasq service. Takes me to a prompt. Running a reconfig results in the same behavior.

Debug Token:

nncaiduhcg

Any help is appreciated!
jrmckinn

it is due to the agressive network manager ubuntu has decided to use. DNS resolution fails on Ubuntu 18.04 · Issue #2179 · pi-hole/pi-hole · GitHub the link is to where this was discussed on Gh and hopefully will point you in the right direction

The installer fails because port 53 is in use by an existing process (most likely, in this case, dnsmasq).

Until next version is released (where this issue is addressed) you can edit /etc/NetworkManager/NetworkManager.conf and remove dns=dnsmasq entry from there.

You'll need to restart NetworkManager after that with sudo systemctl restart NetworkManager.

Make sure dnsmasq is not running after that with ps ax | grep dnsmasq (should return nothing).

Try the install setup after that. :slight_smile:

1 Like

Thanks for the responses!

RamSet, that entry doesn't exist in my NetworkManager.conf file. These are the only entries:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

So, I'm a bit perplexed.

What is the output of the following commands ?

which dnsmasq

sudo systemctl status dnsmasq

ps ax | grep dnsmasq

which dnsmasq
/usr/sbin/dnsmasq

sudo systemctl status dnsmasq
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset:
Active: failed (Result: exit-code) since Tue 2018-06-19 09:56:48 EDT; 3h 55mi
Process: 17893 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status
Process: 17892 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SU

Jun 19 09:56:48 media systemd[1]: Starting dnsmasq - A lightweight DHCP and cach
Jun 19 09:56:48 media dnsmasq[17892]: dnsmasq: syntax check OK.
Jun 19 09:56:48 media dnsmasq[17893]: dnsmasq: failed to create listening socket
Jun 19 09:56:48 media dnsmasq[17893]: failed to create listening socket for port
Jun 19 09:56:48 media dnsmasq[17893]: FAILED to start up
Jun 19 09:56:48 media systemd[1]: dnsmasq.service: Control process exited, code=
Jun 19 09:56:48 media systemd[1]: dnsmasq.service: Failed with result 'exit-code
Jun 19 09:56:48 media systemd[1]: Failed to start dnsmasq - A lightweight DHCP a

ps ax | grep dnsmasq
31297 pts/0 T 0:00 sudo systemctl status dnsmasq
31298 pts/0 T 0:00 systemctl status dnsmasq
31347 pts/0 S+ 0:00 grep --color=auto dnsmasq

Something is using port 53 already.

What's the output of sudo lsof -i :53 +c 0 ?

sudo lsof -i :53 +c 0
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd-resolve 451 systemd-resolve 12u IPv4 20768 0t0 UDP localhost:domain
systemd-resolve 451 systemd-resolve 13u IPv4 20769 0t0 TCP localhost:domain (LISTEN)

And thank you for the help!

Got it !!

edit /etc/systemd/resolved.conf and

change DNSStubListener=yes

to DNSStubListener=no

Then
systemctl restart systemd-resolved

You might have to edit /etc/resolv.conf to a public DNS and re-run pihole -r

That should fix it for you.

Issue is being addressed under:
https://github.com/pi-hole/pi-hole/pull/2218

Ok, dumb question, the entry in resolved.conf is:

#DNSStubListener=yes

Should I also remove the #?

Yes.
By doing that and restarting systemd-resolved we are instructing it to NOT use the internal resolver.

Thanks, RamSet. Almost there. Install ran without error, but admin page comes up with no formatting or info. Here's some of what I see:

d > 1) $gravitydate = $gravitydiff->format("Blocking list updated %a days, %H:%I ago"); elseif($gravitydiff->d == 1) $gravitydate = $gravitydiff->format("Blocking list updated one day, %H:%I ago"); else $gravitydate = $gravitydiff->format("Blocking list updated %H:%I ago"); } else { $gravitydate = "Blocking list not found"; } ?>

Run a pihole -r and reconfigure

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