DNS Service is NOT Running - FTLv4.3.1 Bad option at Line 44

Expected Behaviour:

The DNS service should be running.

Actual Behaviour:

DNS Service and FTL fail to start.

I tried diagnosing the issue with

sudo systemctl stop dnsmasq.service
sudo systemctl restart pihole-FTL.service
sudo systemctl status pihole-FTL.service

returning

pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; bad; vendor preset: enabled)
   Active: active (exited) since Wed 2019-08-28 16:25:46 UTC; 4min 21s ago
     Docs: man:systemd-sysv-generator(8)

However, after running

pihole restartdns                 
  [✓] Starting DNS service

and then,

pihole status                           
  [✗] DNS service is NOT running

I see that the DNS server is not up and FTL is not running.
I also ran pihole -r just to be sure.

I tried to diagnose it further by running
sudo journalctl -xe

And I get

bad option at line 44 of /etc/dnsmasq.d/01-pihole.conf
Aug 28 16:48:26 technexion dnsmasq[24165]: FAILED to start up

which can be traced to the line
dhcp-name-match=set:wpad-ignore,wpad

I tried both solutions to the same issue at

and

But I still get the same error.

My FTL version is v4.3.1 and the date of the system is also correct.

Debug Token:

https://tricorder.pi-hole.net/sxpl5ojfb5

Is dnsmasq attempting to start up here? It appears that it is attempting to start, but falling over because it does not understand that line. Understandable if the version of dnsmasq on your system is < 2.80.

Not that it should be attempting to start, of course, pihole-FTL is a wrapper around (a newer version of) dnsmasq, meaning it is embedded within our process.

What are the outputs of the following commands:

which dnsmasq

systemctl status dnsmasq

May also be worth attempting to disable dnsmasq (systemctl disable dnsmasq) in any case, and then starting pihole-FTL again.

Yes, the version of dnsmasq is currently 2.75 on my system, which seems to the latest stable version for Ubuntu 16.04. (2.75-1ubuntu0.16.04.5)

which dnsmasq
> /usr/sbin/dnsmasq

systemctl status dnsmasq
> ● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/dnsmasq.service.d
           └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
   Active: inactive (dead)

I did run this systemctl disable dnsmasq and try

sudo systemctl stop dnsmasq.service
sudo systemctl restart pihole-FTL.service

But still no dice. The DNS Service and FTL still won't start.

I re-ran sudo journalctl -xe to see what the error might be and saw this

unknown interface wlan0
Aug 28 17:28:24 technexion dnsmasq[5364]: FAILED to start up

It seems to be trying wlan0 even though I am connected via eth0 and don't actually have wlan0 at all (no wireless).

Hmmm. dnsmasq doesn't like duplicate options, I'm wondering if the wpad line is duplicated somewhere.

Can you grep -rl "wpad" /etc/dnsmasq.d, and also cat /etc/dnsmasq.conf to see if there is anything in there.

There are also some changes in an upcoming version that remove the wpad line all together, it may be worth seeing if the development branch works for you. To try that out, run pihole checkout dev (and to switch back if it is not for you, pihole checkout master)

grep -rl "wpad" /etc/dnsmasq.d
> /etc/dnsmasq.d/01-pihole.conf
# This outputs nothing after shifting to the dev branch

cat /etc/dnsmasq.conf
> conf-dir=/etc/dnsmasq.d

So I checked out to the dev branch but the DNS Service and FTL are still unable to start.

Did cross-check the /etc/dnsmasq.d/01-pihole.conf and the wpad line is gone. Re-ran pihole -d and have attached the debug token.

Debug Token on the New Dev branch

https://tricorder.pi-hole.net/lbgf5pmm7b

After another sudo journalctl -xe I am getting the same error as before

unknown interface wlan0
Aug 28 17:44:13 technexion dnsmasq[11937]: FAILED to start up

Disable this and remove it. The version of dnsmasq embedded in pihole-FTL will replace it. Also check for any other processes running on port 53. Something is preventing pihole-FTL from starting on this port. From your debug log:

*** [ DIAGNOSING ]: Ports in use
*:22 sshd (IPv4)
*:22 sshd (IPv6)
*:445 smbd (IPv6)
*:139 smbd (IPv6)
*:445 smbd (IPv4)
*:139 smbd (IPv4)
[*:80] is in use by lighttpd
[*:80] is in use by lighttpd

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✗] Failed to resolve view.atdmt.com.35019.9254.302br.net via localhost (127.0.0.1)
[✗] Failed to resolve view.atdmt.com.35019.9254.302br.net via Pi-hole (192.168.0.2)
[✓] doubleclick.com is 172.217.31.206 via a remote, public DNS server (8.8.8.8)

Port 53 was being used by dnsmasq, I have deleted and removed it.

Sure enough, after rebooting my system and re-running sudo netstat -tulpn

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      1152/smbd       
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1953/lighttpd   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      548/sshd        
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      1152/smbd       
tcp6       0      0 :::139                  :::*                    LISTEN      1152/smbd       
tcp6       0      0 :::80                   :::*                    LISTEN      1953/lighttpd   
tcp6       0      0 :::22                   :::*                    LISTEN      548/sshd        
tcp6       0      0 :::445                  :::*                    LISTEN      1152/smbd       
udp        0      0 0.0.0.0:68              0.0.0.0:*                           985/dhclient    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           515/dhcpcd      
udp        0      0 192.168.0.255:137       0.0.0.0:*                           1048/nmbd       
udp        0      0 192.168.0.2:137         0.0.0.0:*                           1048/nmbd       
udp        0      0 0.0.0.0:137             0.0.0.0:*                           1048/nmbd       
udp        0      0 192.168.0.255:138       0.0.0.0:*                           1048/nmbd       
udp        0      0 192.168.0.2:138         0.0.0.0:*                           1048/nmbd       
udp        0      0 0.0.0.0:138             0.0.0.0:*                           1048/nmbd       
udp        0      0 0.0.0.0:59060           0.0.0.0:*                           403/avahi-daemon: r
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           403/avahi-daemon: r
udp6       0      0 :::34081                :::*                                403/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                403/avahi-daemon: r

Port 53 is no longer being used.

However, re-running pihole -r still gives the same DNS Service is not running.

I also ran sudo systemctl restart pihole-FTL.service and pihole restartdns, but the output of pihole status is still
[✗] DNS service is NOT running

What are the outputs of sudo service pihole-FTL status and sudo journalctl -xe

● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; bad; vendor preset: enabled)
   Active: active (exited) since Wed 2019-08-28 18:31:28 UTC; 25min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 388 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUC

Aug 28 18:31:15 technexion systemd[1]: Starting LSB: pihole-FTL daemon...
Aug 28 18:31:15 technexion pihole-FTL[388]: Not running
Aug 28 18:31:27 technexion su[889]: Successful su for pihole by root
Aug 28 18:31:27 technexion su[889]: + ??? root:pihole
Aug 28 18:31:27 technexion su[889]: pam_unix(su:session): session opened for use
Aug 28 18:31:28 technexion pihole-FTL[388]: dnsmasq: unknown interface wlan0
Aug 28 18:31:28 technexion systemd[1]: Started LSB: pihole-FTL daemon.
Aug 28 18:54:56 technexion systemd[1]: Started LSB: pihole-FTL daemon.
Aug 28 18:54:56 technexion systemd[1]: Started LSB: pihole-FTL daemon.
-- Subject: Unit pihole-FTL.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit pihole-FTL.service has finished starting up.
--
-- The start-up result is done.
Aug 28 18:54:56 technexion sudo[1350]: pam_unix(sudo:session): session closed fo
Aug 28 18:54:58 technexion sudo[1396]:   akshit : TTY=pts/0 ; PWD=/home/akshit ;
Aug 28 18:54:58 technexion sudo[1396]: pam_unix(sudo:session): session opened fo
Aug 28 18:54:58 technexion sudo[1396]: pam_unix(sudo:session): session closed fo
Aug 28 18:55:27 technexion sudo[1416]:   akshit : TTY=pts/0 ; PWD=/home/akshit ;
Aug 28 18:55:27 technexion sudo[1416]: pam_unix(sudo:session): session opened fo
Aug 28 18:56:01 technexion sudo[1416]: pam_unix(sudo:session): session closed fo
Aug 28 18:56:05 technexion sudo[1436]:   akshit : TTY=pts/0 ; PWD=/home/akshit ;
Aug 28 18:56:05 technexion sudo[1436]: pam_unix(sudo:session): session opened fo
Aug 28 18:56:12 technexion sudo[1436]: pam_unix(sudo:session): session closed fo
Aug 28 18:56:34 technexion sudo[1456]:   akshit : TTY=pts/0 ; PWD=/home/akshit ;
Aug 28 18:56:34 technexion sudo[1456]: pam_unix(sudo:session): session opened fo
Aug 28 18:57:13 technexion sudo[1456]: pam_unix(sudo:session): session closed fo
Aug 28 18:57:15 technexion sudo[1475]:   akshit : TTY=pts/0 ; PWD=/home/akshit ;
Aug 28 18:57:15 technexion sudo[1475]: pam_unix(sudo:session): session opened  for user root by akshit(uid=0)

The problem appears to lie with the Pi wlan0 interface. I would check the IP setup on the Pi, then run pihole -r and select reconfigure to setup Pi-Hole on the correct interface.

During reconfiguration, it skips right past the screen where the selection of wlan0 and eth0 is presented.

I think it does that since there is no wlan0 enabled on my device (an arm-v7 board running Ubuntu 16.04).

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1f:7b:86:4f:85
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::17fe:23b0:a6a:43c5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5728 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2697 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4135349 (4.1 MB)  TX bytes:2591216 (2.5 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:11510 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11510 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:850012 (850.0 KB)  TX bytes:850012 (850.0 KB)

The Pi-hole admin console also only says eth0

It is very strange that it errors even though you don't seem to have wlan0 configured anywhere. Please run

grep -n "wlan0" /etc/dnsmasq.conf /etc/dnsmasq.d/* /etc/pihole/setupVars.conf

to see if anything comes up.

This worked!

> /etc/dnsmasq.d/ap-hotspot.rules:4:interface=wlan0

I went ahead and changed the entry in the file to eth0.

Tried restarting the server after that and it works!
Looks like a bug where it incorrectly assigned wlan0 for the interface.

 pihole restartdns
  [✓] Restarting DNS service
akshit@technexion:~$ pihole status
  [✓] DNS service is running
  [✓] Pi-hole blocking is Enabled

I went ahead and ran pihole -d to confirm that it works.

Debug Token (with working Pi-hole)

https://tricorder.pi-hole.net/xuovlg4quf

Thank you all for sticking through the debugging process :slight_smile:
Looking forward to contributing to the community.

1 Like

Awessome I like getting to the end of a thread like this and success was achieved. Well done for figuring it out!

You haven't talked about running a custom hostspot on your Pi-hole, so far. Please double-check this file to ensure it doesn't contain more stuff that shouldn't be there. This is not a Pi-hole file and you should remove it if you don't need it.

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