DNS service not running and FTL offline after last update

Actual Behaviour:

I ran "pihole -up" today and got the problem that Pihole stopped working. The admin panel says
DNS service not running and FTL offline.

I already ran "pihole -r" and already reinstalled it, but the issue wont go away.

Debug Token:

For some reason i got this error message
"[βœ—] There was an error uploading your debug log."

So i dont see any token.

Thanks in avance for any help.

Please try the following steps

  1. sudo nano /etc/resolv.conf
  2. edit 127.0.0.1 to 9.9.9.9
  3. save
  4. Re-run pihole -up

Seems like everything is ok. But the Webpanel still says
"DNS service not running and FTL offline"and also "Lost conection to API".

[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: up to date

[βœ“] Everything is up to date!

Please try a repair for us now that we know resolution is working pihole -r and select repair at the prompt

Still the same problem.

I got these two errors during repair:

[βœ—] Backing up index.lighttpd.html
No default index.lighttpd.html file found... not backing up

[βœ—] DNS service is NOT running

Everything else is ticked green.

What OS are do you have Pi-hole installed on ?

I have a feeling your issue is with dnsmasq still taking over port 53 and breaking FTLDNS.

Is it Ubuntu(or derivative) by any chance ?

I use Jessie lite

Please run the following command

pihole checkout master

Still not working and got the same two errors as before when i tried "pihole -r".

[βœ—] Backing up index.lighttpd.html
No default index.lighttpd.html file found… not backing up

[βœ—] DNS service is NOT running
Everything else is ticked green.

Is an expected behaviour and can be ignored.

what is the result of sudo lsof -i :53

Nothing happens. It just jumps to the next line.

Can you take a look at /var/log/ and see if there is a Pi-hole debug log? If you find the sanitized version, you can paste that here in a reply for us to take a look at..

*** [ INITIALIZING ] 

[i] 2018-08-06:19:44:26 debug log has been initialized.

*** [ INITIALIZING ] Sourcing setup variables

[i] Sourcing /etc/pihole/setupVars.conf...

*** [ DIAGNOSING ]: Core version

[i] Core: mv4.0 ( How do I update Pi-hole? )
[i] Branch: master
[i] Commit: v4.0-0-gddbdb51

*** [ DIAGNOSING ]: Web version

[i] Web: mv4.0 ( How do I update Pi-hole? )
[i] Branch: master
[i] Commit: v4.0-0-gaf8c926

*** [ DIAGNOSING ]: FTL version

[ βœ“ ] FTL: mv4.0 ( How do I update Pi-hole? )

*** [ DIAGNOSING ]: dnsmasq version

[i] 2.76

*** [ DIAGNOSING ]: lighttpd version

[i] 1.4.35

*** [ DIAGNOSING ]: php version

[i] 5.6.36

*** [ DIAGNOSING ]: Operating system

[ βœ“ ] Raspbian GNU/Linux 8 (jessie)

*** [ DIAGNOSING ]: SELinux

[i] SELinux not detected

*** [ DIAGNOSING ]: Processor

[ βœ“ ] armv7l

*** [ DIAGNOSING ]: Networking

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

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

[i] Default IPv4 gateway: 192.168.178.1

  • Pinging 192.168.178.1...
    [ βœ“ ] Gateway responded.
*** [ DIAGNOSING ]: Ports in use

*:6600 systemd (IPv6)
*:22 sshd (IPv4)
*:22 sshd (IPv6)
*:3483 squeezebox (IPv4)
*:9090 squeezebox (IPv4)
*:9000 squeezebox (IPv4)
*:3389 xrdp (IPv4)
127.0.0.1:3350 xrdp-sesma (IPv4)
*:80 lighttpd (IPv4)
*:80 lighttpd (IPv6)
*:445 smbd (IPv6)
*:139 smbd (IPv6)
*:445 smbd (IPv4)
*:139 smbd (IPv4)

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain

[ βœ— ] Failed to resolve complex-media-d.openx.net via localhost (127.0.0.1)
[ βœ— ] Failed to resolve complex-media-d.openx.net via Pi-hole (192.168.178.44)
[ βœ“ ] doubleclick.com is 172.217.22.46 via a remote, public DNS server (8.8.8.8)

*** [ DIAGNOSING ]: Pi-hole processes

[ βœ— ] dnsmasq daemon is inactive
[ βœ“ ] lighttpd daemon is active
[ βœ“ ] pihole-FTL daemon is active

*** [ DIAGNOSING ]: Setup variables
PIHOLE_INTERFACE=eth0
IPV4_ADDRESS=192.168.178.44/24
IPV6_ADDRESS=
PIHOLE_DNS_1=192.168.178.1
PIHOLE_DNS_2=
QUERY_LOGGING=true
INSTALL_WEB_SERVER=true
INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=true

*** [ DIAGNOSING ]: Dashboard and block page

βœ— ] Block page X-Header: X-Header does not match or could not be retrieved.
HTTP/1.1 200 OK
Content-Type: text/html
Accept-Ranges: bytes
ETag: "3117143067"
Last-Modified: Thu, 12 Jan 2017 17:59:23 GMT
Content-Length: 10701
Date: Mon, 06 Aug 2018 17:44:34 GMT
Server: lighttpd/1.4.35

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

*** [ DIAGNOSING ]: Gravity list
-rw-r--r-- 1 root root 3039333 Aug  6 19:25 /etc/pihole/gravity.list 
   -----head of gravity.list------ 

0.0.0.0
0.r.msn.com
0.start.bz
000.0x1f4b0.com

   -----tail of gravity.list------ 

zzz.clickbank.net
zzzezeroe.fr
zzzpooeaz-france.com
zzzrtrcm2.com

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

-rw-r--r-- 1 root root 381 Aug  6 19:02 /etc/pihole/adlists.list 

https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt

-rw-r--r-- 1 root root 47 Aug  6 19:25 /etc/pihole/local.list 

192.168.178.44 Logitech
192.168.178.44 pi.hole

-rw-r--r-- 1 root root 234 Aug  6 19:25 /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 1499 Aug  6 19:25 /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=192.168.178.1
interface=eth0

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

-rw-r--r-- 1 root root 3027 Aug  6 19:25 /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 1495 Aug  6 19:25 /etc/cron.d/pihole 

50 4 * * 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
4 18 * * * 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 2569 Aug  6 19:26 /var/log/lighttpd/error.log 

2018-08-06 06:25:06: (server.c.1242) logfiles cycled UID = 0 PID = 8337
2018-08-06 17:45:32: (server.c.1558) server stopped by UID = 0 PID = 1
2018-08-06 17:45:33: (log.c.164) server started
2018-08-06 17:45:33: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)
2018-08-06 17:48:31: (server.c.1558) server stopped by UID = 0 PID = 1
2018-08-06 17:48:33: (log.c.164) server started
2018-08-06 17:48:33: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)
2018-08-06 17:50:18: (server.c.1558) server stopped by UID = 0 PID = 1
2018-08-06 17:50:19: (log.c.164) server started
2018-08-06 17:50:19: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)
2018-08-06 18:12:16: (server.c.1558) server stopped by UID = 0 PID = 1
2018-08-06 18:12:16: (log.c.164) server started
2018-08-06 18:12:16: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)
2018-08-06 18:19:14: (server.c.1558) server stopped by UID = 0 PID = 1
2018-08-06 18:19:15: (log.c.164) server started
2018-08-06 18:19:15: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)
2018-08-06 18:25:17: (server.c.1558) server stopped by UID = 0 PID = 1
2018-08-06 18:25:23: (log.c.164) server started
2018-08-06 18:25:23: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)
2018-08-06 18:35:37: (server.c.1558) server stopped by UID = 0 PID = 1
2018-08-06 18:35:37: (log.c.164) server started
2018-08-06 18:35:37: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)
2018-08-06 18:54:38: (server.c.1558) server stopped by UID = 0 PID = 1
2018-08-06 18:54:38: (log.c.164) server started
2018-08-06 18:54:38: (server.c.1045) WARNING: unknown config-key: alias.url (ignored)

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

-rw-r--r-- 1 pihole pihole 12312 Aug  6 19:26 /var/log/pihole-FTL.log 
   -----head of pihole-FTL.log------ 

[2018-08-06 19:03:48.605] ########## FTL started! ##########
[2018-08-06 19:03:48.605] FTL branch:
[2018-08-06 19:03:48.606] FTL version: v4.0
[2018-08-06 19:03:48.606] FTL commit: 8493df4
[2018-08-06 19:03:48.606] FTL date: 2018-08-05 13:40:30 -0700
[2018-08-06 19:03:48.606] FTL user: pihole
[2018-08-06 19:03:48.606] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2018-08-06 19:03:48.606] SOCKET_LISTENING: only local
[2018-08-06 19:03:48.607] AAAA_QUERY_ANALYSIS: Show AAAA queries
[2018-08-06 19:03:48.607] MAXDBDAYS: max age for stored queries is 365 days
[2018-08-06 19:03:48.607] RESOLVE_IPV6: Resolve IPv6 addresses
[2018-08-06 19:03:48.607] RESOLVE_IPV4: Resolve IPv4 addresses
[2018-08-06 19:03:48.607] DBINTERVAL: saving to DB file every minute
[2018-08-06 19:03:48.607] DBFILE: Using /etc/pihole/pihole-FTL.db
[2018-08-06 19:03:48.607] MAXLOGAGE: Importing up to 24.0 hours of log data
[2018-08-06 19:03:48.608] PRIVACYLEVEL: Set to 0
[2018-08-06 19:03:48.608] IGNORE_LOCALHOST: Show queries from localhost
[2018-08-06 19:03:48.608] BLOCKINGMODE: Null IPs for blocked domains
[2018-08-06 19:03:48.608] REGEX_DEBUGMODE: Inactive
[2018-08-06 19:03:48.608] Finished config file parsing
[2018-08-06 19:03:48.608] INFO: No whitelist file found
[2018-08-06 19:03:48.608] Compiled 0 Regex filters and -1 whitelisted domains in 0.3 msec (0 errors)
[2018-08-06 19:03:48.609] db_init() - Cannot open database (14): unable to open database file
[2018-08-06 19:03:48.609] Creating new (empty) database
[2018-08-06 19:03:48.778] Database successfully initialized
[2018-08-06 19:03:48.780] Imported 0 queries from the long-term database
[2018-08-06 19:03:48.780] -> Total DNS queries: 0
[2018-08-06 19:03:48.780] -> Cached DNS queries: 0
[2018-08-06 19:03:48.780] -> Forwarded DNS queries: 0
[2018-08-06 19:03:48.780] -> Exactly blocked DNS queries: 0
[2018-08-06 19:03:48.781] -> Unknown DNS queries: 0
[2018-08-06 19:03:48.781] -> Unique domains: 0
[2018-08-06 19:03:48.781] -> Unique clients: 0
[2018-08-06 19:03:48.781] -> Known forward destinations: 0
[2018-08-06 19:03:48.781] Successfully accessed setupVars.conf

   -----tail of pihole-FTL.log------ 

[2018-08-06 19:25:44.527] -> Known forward destinations: 0
[2018-08-06 19:25:44.527] Successfully accessed setupVars.conf
[2018-08-06 19:26:52.056] ########## FTL started! ##########
[2018-08-06 19:26:52.066] FTL branch:
[2018-08-06 19:26:52.067] FTL version: v4.0
[2018-08-06 19:26:52.067] FTL commit: 8493df4
[2018-08-06 19:26:52.067] FTL date: 2018-08-05 13:40:30 -0700
[2018-08-06 19:26:52.067] FTL user: pihole
[2018-08-06 19:26:52.074] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2018-08-06 19:26:52.075] SOCKET_LISTENING: only local
[2018-08-06 19:26:52.075] AAAA_QUERY_ANALYSIS: Show AAAA queries
[2018-08-06 19:26:52.075] MAXDBDAYS: max age for stored queries is 365 days
[2018-08-06 19:26:52.075] RESOLVE_IPV6: Resolve IPv6 addresses
[2018-08-06 19:26:52.076] RESOLVE_IPV4: Resolve IPv4 addresses
[2018-08-06 19:26:52.076] DBINTERVAL: saving to DB file every minute
[2018-08-06 19:26:52.076] DBFILE: Using /etc/pihole/pihole-FTL.db
[2018-08-06 19:26:52.076] MAXLOGAGE: Importing up to 24.0 hours of log data
[2018-08-06 19:26:52.077] PRIVACYLEVEL: Set to 0
[2018-08-06 19:26:52.077] IGNORE_LOCALHOST: Show queries from localhost
[2018-08-06 19:26:52.077] BLOCKINGMODE: Null IPs for blocked domains
[2018-08-06 19:26:52.077] REGEX_DEBUGMODE: Inactive
[2018-08-06 19:26:52.077] Finished config file parsing
[2018-08-06 19:26:52.078] INFO: No whitelist file found
[2018-08-06 19:26:52.078] Compiled 0 Regex filters and -1 whitelisted domains in 0.4 msec (0 errors)
[2018-08-06 19:26:52.109] Database successfully initialized
[2018-08-06 19:26:52.111] Imported 0 queries from the long-term database
[2018-08-06 19:26:52.112] -> Total DNS queries: 0
[2018-08-06 19:26:52.112] -> Cached DNS queries: 0
[2018-08-06 19:26:52.112] -> Forwarded DNS queries: 0
[2018-08-06 19:26:52.112] -> Exactly blocked DNS queries: 0
[2018-08-06 19:26:52.112] -> Unknown DNS queries: 0
[2018-08-06 19:26:52.113] -> Unique domains: 0
[2018-08-06 19:26:52.113] -> Unique clients: 0
[2018-08-06 19:26:52.113] -> Known forward destinations: 0
[2018-08-06 19:26:52.113] Successfully accessed setupVars.conf

*** [ DIAGNOSING ]: Locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

*** [ DIAGNOSING ]:  Pi-hole log
-rw-r--r-- 1 pihole pihole 0 Aug  6 19:26 /var/log/pihole.log 
   -----head of pihole.log------

The init system is killing the processes. We've seen that before but we're not sure why SystemD / SysVInit likes to kill the process. Can you run sudo pihole-FTL -f and see if that prints out any errors or notifications?

Thats what i get:

"dnsmasq: failed to bind DHCP server socket: Address already in use"

Okay, so there is a DHCP server running on the system. Try sudo ss -ulpn and see what is bound to port UDP/67.

Edit: It may also be on UDP/68.

Do i need to add the 67 somewhere?
Because thats what i get:

State Recv-Q Send-Q Local Address:Port Peer Address:Port

Just a blank list, no entries? That's very strange. Let's check the IP stack. What does sudo ss -tulpn print out?

Just a blank list.

Netid  State      Recv-Q Send-Q                 Local Address:Port                   Peer Address:Port
tcp    LISTEN     0      5                          127.0.0.1:4711                              *:*      users:(("pihole-FTL",pid=18162,fd=12))
tcp    LISTEN     0      128                                *:9000                              *:*      users:(("squeezeboxserve",pid=556,fd=29))
tcp    LISTEN     0      50                                 *:139                               *:*      users:(("smbd",pid=959,fd=38))
tcp    LISTEN     0      128                                *:80                                *:*      users:(("lighttpd",pid=15624,fd=5))
tcp    LISTEN     0      32                                 *:53                                *:*      users:(("pihole-FTL",pid=18162,fd=7))
tcp    LISTEN     0      128                                *:22                                *:*      users:(("sshd",pid=538,fd=3))
tcp    LISTEN     0      2                          127.0.0.1:3350                              *:*      users:(("xrdp-sesman",pid=604,fd=6))
tcp    LISTEN     0      128                                *:3483                              *:*      users:(("squeezeboxserve",pid=556,fd=9))
tcp    LISTEN     0      50                                 *:445                               *:*      users:(("smbd",pid=959,fd=37))
tcp    LISTEN     0      2                                  *:3389                              *:*      users:(("xrdp",pid=592,fd=6))
tcp    LISTEN     0      128                                *:9090                              *:*      users:(("squeezeboxserve",pid=556,fd=25))
tcp    LISTEN     0      5                                 :::6600                             :::*      users:(("systemd",pid=1,fd=34))
tcp    LISTEN     0      50                                :::139                              :::*      users:(("smbd",pid=959,fd=36))
tcp    LISTEN     0      128                               :::80                               :::*      users:(("lighttpd",pid=15624,fd=6))
tcp    LISTEN     0      32                                :::53                               :::*      users:(("pihole-FTL",pid=18162,fd=9))
tcp    LISTEN     0      128                               :::22                               :::*      users:(("sshd",pid=538,fd=4))
tcp    LISTEN     0      50                                :::445                              :::*      users:(("smbd",pid=959,fd=35))

This probably won't matter, but good to check: Have you rebooted any time during this process? If not, try that just to clear things out.