DNS service not running and unable start

Hi Team,

I recently upgraded to Pi-hole Version v3.3 Web Interface Version v3.3 FTL Version v3.0
and ever since then, i have had problems with DNS and FTL starting.
I managed to resolve me FTL problems by running
#sudo service pihole-FTL restart

Now I just can't get DNS to start.

Output for below
root@Server:/# sudo service dnsmasq status
Please help.
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled)
Drop-In: /run/systemd/generator/dnsmasq.service.d
└─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
Active: failed (Result: exit-code) since Sat 2018-02-24 13:04:51 AEDT; 5min ago
Process: 12013 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=1/FAILURE)

Feb 24 13:04:51 Server dnsmasq[12013]: dnsmasq: extraneous parameter at line 37 of /etc/dnsmasq.d/01-pihole.conf
Feb 24 13:04:51 Server systemd[1]: dnsmasq.service: control process exited, code=exited status=1
Feb 24 13:04:51 Server systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Feb 24 13:04:51 Server systemd[1]: Unit dnsmasq.service entered failed state.

Actual Behaviour:
#pihole -d
This process collects information from your Pi-hole, and optionally uploads it to a unique and random directory on tricorder.pi-hole.net.

The intent of this script is to allow users to self-diagnose their installations. This is accomplished by running tests against our software and providing the user with links to FAQ articles when a problem is detected. Since we are a small team and Pi-hole has been growing steadily, it is our hope that this will help us spend more time on development.

NOTE: All log files auto-delete after 48 hours and ONLY the Pi-hole developers can access your data via the given token. We have taken these extra steps to secure your data and will work to further reduce any personal information gathered.

*** [ INITIALIZING ]
[i] 2018-02-24:13:00:37 debug log has been initialized.

*** [ INITIALIZING ] Sourcing setup variables
[i] Sourcing /etc/pihole/setupVars.conf...

*** [ DIAGNOSING ]: Core version
[i] Core: v3.3 (How do I update Pi-hole?)
[i] Branch: master
[i] Commit: v3.3-0-g1e87850

*** [ DIAGNOSING ]: Web version
[i] Web: v3.3 (How do I update Pi-hole?)
[i] Branch: master
[i] Commit: v3.3-0-ge48aa29

*** [ DIAGNOSING ]: FTL version
[βœ“] FTL: v3.0

*** [ DIAGNOSING ]: dnsmasq version
[i] 2.72

*** [ DIAGNOSING ]: lighttpd version
[i] 1.4.35

*** [ DIAGNOSING ]: php version
[i] 5.6.33

*** [ DIAGNOSING ]: Operating system
[βœ“] Debian GNU/Linux 8 (jessie)

*** [ DIAGNOSING ]: SELinux
[i] SELinux not detected

*** [ DIAGNOSING ]: Processor
[i] x86_64

*** [ DIAGNOSING ]: Networking
[βœ“] IPv4 address(es) bound to the eth0 interface:
10.1.1.13/24 matches the IP found in /etc/pihole/setupVars.conf

[βœ—] No IPv6 address(es) found on the eth0 interface.

[i] Default IPv4 gateway: 10.1.1.1

  • Pinging 10.1.1.1...
    [βœ“] Gateway responded.

*** [ DIAGNOSING ]: Ports in use
[111] is in use by rpcbind
[1355] is in use by Plex
[139] is in use by smbd
is in use by
[21] is in use by proftpd
[22] is in use by sshd
[32400] is in use by Plex
[32469] is in use by Plex
[40411] is in use by rpc.statd
[445] is in use by smbd
[45829] is in use by rpc.statd
[8080] is in use by SABnzbd.p
[80] is in use by lighttpd
[8888] is in use by nginx
[2015] is in use by expressvp
[2812] is in use by monit
[32401] is in use by Plex
[32600] is in use by Plex
[33085] is in use by Plex
[4711] is in use by pihole-FTL

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
shuf: /etc/pihole/gravity.list: No such file or directory
dig: '' is not a legal name (unexpected end of input)
[βœ—] Failed to resolve via localhost (127.0.0.1)
dig: '' is not a legal name (unexpected end of input)
[βœ—] Failed to resolve via Pi-hole (10.1.1.13)
[βœ“] doubleclick.com is 216.58.196.142 via a remote, public DNS server (8.8.8.8)

*** [ DIAGNOSING ]: Pi-hole processes
[βœ—] dnsmasq daemon is failed
[βœ“] lighttpd daemon is active
[βœ“] pihole-FTL daemon is active

*** [ DIAGNOSING ]: Setup variables
PIHOLE_INTERFACE=eth0
IPV4_ADDRESS=10.1.1.13/24
IPV6_ADDRESS=
PIHOLE_DNS_1=208.67.222.222
PIHOLE_DNS_2=208.67.220.220
QUERY_LOGGING=true
INSTALL_WEB=true
LIGHTTPD_ENABLED=1

*** [ DIAGNOSING ]: Dashboard and block page
[βœ—] X-Header does not match or could not be retrieved.
HTTP/1.1 200 OK
Content-type: text/html; charset=UTF-8
Date: Sat, 24 Feb 2018 02:00:51 GMT
Server: lighttpd/1.4.35

[βœ“] X-Pi-hole: The Pi-hole Web interface is working!

*** [ DIAGNOSING ]: Gravity list
ls: cannot access /etc/pihole/gravity.list: No such file or directory

head: cannot open β€˜/etc/pihole/gravity.list’ for reading: No such file or directory
-----head of gravity.list------

tail: cannot open β€˜/etc/pihole/gravity.list’ for reading: No such file or directory
-----tail of gravity.list------

*** [ DIAGNOSING ]: contents of /etc/pihole

-rw-r--r-- 1 root root 234 Feb 24 12:07 /etc/pihole/logrotate
/var/log/pihole.log {
su root root
daily
copytruncate
rotate 5
compress
delaycompress
notifempty
nomail
}
/var/log/pihole-FTL.log {
su root root
weekly
copytruncate
rotate 3
compress
delaycompress
notifempty
nomail
}

*** [ DIAGNOSING ]: contents of /etc/dnsmasq.d

-rw-r--r-- 1 root root 1522 Feb 24 12:52 /etc/dnsmasq.d/01-pihole.conf
addn-hosts=/etc/pihole/gravity.list
addn-hosts=/etc/pihole/black.list
addn-hosts=/etc/pihole/local.list
localise-queries
no-resolv
cache-size=10000
log-queries=extra
log-facility=/var/log/pihole.log
local-ttl=2
log-async
server=208.67.222.222
server=208.67.220.220
interface=eth0

*** [ DIAGNOSING ]: contents of /etc/lighttpd

-rw-r--r-- 1 root root 3027 Feb 24 12:07 /etc/lighttpd/lighttpd.conf
server.modules = (
"mod_access",
"mod_accesslog",
"mod_auth",
"mod_expire",
"mod_compress",
"mod_redirect",
"mod_setenv",
"mod_rewrite"
)
server.document-root = "/var/www/html"
server.error-handler-404 = "pihole/index.php"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
accesslog.filename = "/var/log/lighttpd/access.log"
accesslog.format = "%{%s}t|%V|%r|%s|%b"
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc", ".md", ".yml", ".ini" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "find /etc/lighttpd/conf-enabled -name '*.conf' -a ! -name 'letsencrypt.conf' -printf 'include "%p"
' 2>/dev/null"
$HTTP["url"] =~ "^/admin/" {

   setenv.add-response-header = (
       "X-Pi-hole" => "The Pi-hole Web interface is working!",
       "X-Frame-Options" => "DENY"
   )
   $HTTP["url"] =~ ".ttf$" {

       setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
   }

}
$HTTP["url"] =~ "^/admin/.(.*)" {
url.access-deny = ("")
}
include_shell "cat external.conf 2>/dev/null"

*** [ DIAGNOSING ]: contents of /etc/cron.d

-rw-r--r-- 1 root root 1496 Feb 24 12:07 /etc/cron.d/pihole
26 3 * * 7 root PATH="$PATH:/usr/local/bin/" pihole updateGravity
00 00 * * * root PATH="$PATH:/usr/local/bin/" pihole flush once quiet
@reboot root /usr/sbin/logrotate /etc/pihole/logrotate
*/10 * * * * root PATH="$PATH:/usr/local/bin/" pihole updatechecker local
32 12 * * * root PATH="$PATH:/usr/local/bin/" pihole updatechecker remote
@reboot root PATH="$PATH:/usr/local/bin/" pihole updatechecker remote reboot

*** [ DIAGNOSING ]: contents of /var/log/lighttpd

-rw-r--r-- 1 www-data www-data 3010 Feb 24 12:52 /var/log/lighttpd/error.log
2018-02-19 00:07:12: (server.c.1242) logfiles cycled UID = 0 PID = 1929
2018-02-19 00:59:00: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-19 08:02:11: (log.c.164) server started
2018-02-19 23:00:02: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-20 00:02:11: (log.c.164) server started
2018-02-20 00:59:01: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-20 08:02:10: (log.c.164) server started
2018-02-20 22:00:58: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning: unlink(../custom_disable_timer): No such file or directory in /var/www/html/admin/api.php on line 47
2018-02-20 22:09:28: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-20 22:22:05: (log.c.164) server started
2018-02-20 22:23:27: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-21 00:02:10: (log.c.164) server started
2018-02-21 00:59:01: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-21 08:02:11: (log.c.164) server started
2018-02-21 17:33:37: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-21 21:18:51: (log.c.164) server started
2018-02-21 21:38:36: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning: unlink(../custom_disable_timer): No such file or directory in /var/www/html/admin/api.php on line 47
2018-02-21 21:40:42: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning: unlink(../custom_disable_timer): No such file or directory in /var/www/html/admin/api.php on line 47
2018-02-21 21:46:16: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Warning: unlink(../custom_disable_timer): No such file or directory in /var/www/html/admin/api.php on line 47
2018-02-21 22:26:53: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-23 17:57:23: (log.c.164) server started
2018-02-23 22:24:23: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-24 00:02:10: (log.c.164) server started
2018-02-24 00:59:01: (server.c.1558) server stopped by UID = 0 PID = 1
2018-02-24 08:02:10: (log.c.164) server started

*** [ DIAGNOSING ]: contents of /var/log

-rw-r--r-- 1 pihole pihole 5245 Feb 24 12:52 /var/log/pihole-FTL.log
[2018-02-24 12:51:58.806]
[2018-02-24 12:51:58.806] FTL branch: v3.0
[2018-02-24 12:51:58.806] FTL version: v3.0
[2018-02-24 12:51:58.806] FTL commit: a1b2fa03f8f3e3713b57a26a4e9a062fec0573d7
[2018-02-24 12:51:58.806] FTL date: 2018-02-14 12:45:47 -0800
[2018-02-24 12:51:58.806] FTL user: pihole
[2018-02-24 12:51:58.806] Notice: Found no readable FTL config file
[2018-02-24 12:51:58.806] Using default settings
[2018-02-24 12:51:58.806] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2018-02-24 12:51:58.806] SOCKET_LISTENING: only local
[2018-02-24 12:51:58.806] QUERY_DISPLAY: Show queries
[2018-02-24 12:51:58.806] AAAA_QUERY_ANALYSIS: Show AAAA queries
[2018-02-24 12:51:58.806] MAXDBDAYS: max age for stored queries is 365 days
[2018-02-24 12:51:58.806] RESOLVE_IPV6: Resolve IPv6 addresses
[2018-02-24 12:51:58.806] RESOLVE_IPV4: Resolve IPv4 addresses
[2018-02-24 12:51:58.806] DBINTERVAL: saving to DB file every minute
[2018-02-24 12:51:58.806] DBFILE: Using /etc/pihole/pihole-FTL.db
[2018-02-24 12:51:58.806] MAXLOGAGE: Importing up to 24.0 hours of log data
[2018-02-24 12:51:58.807] Finished config file parsing
[2018-02-24 12:51:58.811] Found no other running pihole-FTL process
[2018-02-24 12:51:58.813] PID of FTL process: 5793
[2018-02-24 12:51:58.813] Error: failed to read /etc/pihole/list.preEventHorizon
[2018-02-24 12:51:58.813] Gravity list entries: -1
[2018-02-24 12:51:58.813] No blacklist present
[2018-02-24 12:51:58.813] No wildcard blocking list present

*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r-- 1 dnsmasq root 0 Feb 24 12:51 /var/log/pihole.log
-----head of pihole.log------



[βœ“] ** FINISHED DEBUGGING! **

Debug Token: Your debug token is: vii7rywji4

I have this same issue with a fresh install.

Having this exact same issue after an update last night, can't get to start dnsmasq for some reason.

[βœ“] Your debug token is: pnue5ldo7b

Update 2018-02-18 06:12
If you're running Raspbian Jessie and you updated Pi-hole to v3.3, you likely ran into issues. This is because the version of dnsmasq that ships with it does not support the log-queries=extra option, which we use in v3.3.

You have two options to resolve this: revert Pi-hole to a previous version or upgrade dnsmasq manually.

Continued at Pi-hole v3.3 Released: It's "Extra" Special

Hi Dan,
Thanks for the information. unfortunately, I'm running Debian GNU/Linux 8 (jessie).
I did try downgrading but it didn't work. Still getting
*** [ DIAGNOSING ]: Pi-hole processes
[βœ—] dnsmasq daemon is failed

My new debug token is: kob7jlm7tb
Any and all help is appreciated.
Thanks
Oliver

Remove the line log-queries=extra from /etc/dnsmasq.d/01-pihole.conf

Hi Dan,
Thanks, downgrading to 3.2.1 resolved my issue, next step is to upgrade dnsmasq manually and trying the upgrade again.

Thanks for you help!

Hi Dan,

That did the job. Thanks for the advice.

Thanks again
Oliver