Please follow the below template, it will help us to help you!
Expected Behaviour:
Block ads
Actual Behaviour:
After a few hours working, pi-hole just stop working and it says Api Connection To Api
Debug Token:
rnivm4xato (this is my debug Token when pi-hole works, when it doesn't works, I can't update the debug token, so I'll paste it below.
Hi guys, I really love pi-hole, been using it for almost a year and it works perfectly.
But a few weeks ago, almost once a day, it just stops working and it says Lost Connection To Api. If I restart my raspberry, it works fine again for a few hours, and again it stops.
I don't know if it can be because OpenVPN (I installed it a few weeks ago and I use it with pi-hole).
I can't upload my debug token when pi-hole is not working, so I'll paste it below.
I hope you can help me find a solution.
Thank you very much guys.
Debug:
*** [ INITIALIZING ]
[i] 2019-01-12:17:31:22 debug log has been initialized.
*** [ INITIALIZING ] Sourcing setup variables
[i] Sourcing /etc/pihole/setupVars.conf...
*** [ DIAGNOSING ]: Core version
[i] Core: v4.1.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v4.1.1-0-g8d85d46
*** [ DIAGNOSING ]: Web version
[i] Web: v4.1.2 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v4.1.2-0-g53ba480f
*** [ DIAGNOSING ]: FTL version
[✓] FTL: v4.1.2 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
*** [ DIAGNOSING ]: lighttpd version
[i] 1.4.45
*** [ DIAGNOSING ]: php version
[i] 7.0.33
*** [ DIAGNOSING ]: Operating system
[✓] Raspbian GNU/Linux 9 (stretch)
*** [ DIAGNOSING ]: SELinux
[i] SELinux not detected
*** [ DIAGNOSING ]: Processor
[✓] armv7l
*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
192.168.0.131/24 matches the IP found in /etc/pihole/setupVars.conf
[✓] IPv6 address(es) bound to the eth0 interface:
fd2c:f385:b722:0:ba27:ebff:fe59:16b3 does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)
fe80::ba27:ebff:fe59:16b3 does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)
^ Please note that you may have more than one IP address listed.
As long as one of them is green, and it matches what is in /etc/pihole/setupVars.conf, there is no need for concern.
The link to the FAQ is for an issue that sometimes occurs when the IPv6 address changes, which is why we check for it.
[i] Default IPv4 gateway: 192.168.0.1
* Pinging 192.168.0.1...
[✓] Gateway responded.
*** [ DIAGNOSING ]: Ports in use
*:32400 Plex Me (IPv4)
127.0.0.1:32401 Plex Me (IPv4)
*:5900 vncserver- (IPv6)
*:5900 vncserver- (IPv4)
*:6666 sshd (IPv4)
*:6666 sshd (IPv6)
*:5938 teamviewer (IPv6)
*:5938 teamviewer (IPv4)
127.0.0.1:5939 teamviewer (IPv4)
[*:80] is in use by lighttpd
[*:80] is in use by lighttpd
*:445 smbd (IPv6)
*:139 smbd (IPv6)
*:445 smbd (IPv4)
*:139 smbd (IPv4)
127.0.0.1:34435 Plex Sc (IPv4)
*:8282 python (IPv4)
127.0.0.1:36395 Plex Sc (IPv4)
*:1753 Plex DL (IPv4)
*:32469 Plex DL (IPv4)
127.0.0.1:32600 Plex Tu (IPv4)
*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✗] Failed to resolve hot-defloration-cum-gargling-sexy.blogspot.co.za via localhost (127.0.0.1)
[✗] Failed to resolve hot-defloration-cum-gargling-sexy.blogspot.co.za via Pi-hole (192.168.0.131)
[✓] doubleclick.com is 216.58.211.46 via a remote, public DNS server (8.8.8.8)
*** [ DIAGNOSING ]: Name resolution (IPv6) using a random blocked domain and a known ad-serving domain
[✗] Failed to resolve brookvbdeaorn.blogspot.ba via localhost (::1)
[✗] Failed to resolve brookvbdeaorn.blogspot.ba via Pi-hole (fd2c:f385:b722:0:ac81:58b6:d0af:8ed7)
[✗] Failed to resolve doubleclick.com via a remote, public DNS server (2001:4860:4860::8888)
*** [ DIAGNOSING ]: Pi-hole processes
[✓] lighttpd daemon is active
[✓] pihole-FTL daemon is active
*** [ DIAGNOSING ]: Setup variables
DNSMASQ_LISTENING=all
DNS_FQDN_REQUIRED=false
DNS_BOGUS_PRIV=false
DNSSEC=false
CONDITIONAL_FORWARDING=false
PIHOLE_INTERFACE=eth0
IPV4_ADDRESS=192.168.0.131/24
IPV6_ADDRESS=fd2c:f385:b722:0:ac81:58b6:d0af:8ed7
PIHOLE_DNS_1=192.168.0.1#53
PIHOLE_DNS_2=
QUERY_LOGGING=true
INSTALL_WEB_SERVER=true
INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=true
SPEEDTESTSCHEDULE=1
SPEEDTEST_SERVER=
SPEEDTEST_CHART_DAYS=1
BLOCKING_ENABLED=true
*** [ DIAGNOSING ]: Dashboard and block page
[✓] Block page X-Header: X-Pi-hole: A black hole for Internet advertisements.
[✓] Web interface X-Header: X-Pi-hole: The Pi-hole Web interface is working!
*** [ DIAGNOSING ]: Gravity list
-rw-r--r-- 1 root root 52645466 ene 9 11:02 /etc/pihole/gravity.list
-----head of gravity.list------
--little--princess--.tumblr.com
-allporn-.tumblr.com
-becca-anal-.tumblr.com
-celestial-beings-.tumblr.com
-----tail of gravity.list------
zzzrtrcm2.com
zzztube.com
zzzyzxxx.tumblr.com
zzzz-m.tumblr.com
*** [ DIAGNOSING ]: contents of /etc/pihole
-rw-r--r-- 1 root root 486 dic 17 19:27 /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
https://raw.githubusercontent.com/chadmayfield/pihole-blocklists/master/lists/pi_blocklist_porn_all.list
-rw-r--r-- 1 root root 200 ene 9 11:03 /etc/pihole/local.list
192.168.0.131 raspberrypi
fd2c:f385:b722:0:ac81:58b6:d0af:8ed7 raspberrypi
192.168.0.131 pi.hole
fd2c:f385:b722:0:ac81:58b6:d0af:8ed7 pi.hole
10.8.0.2 iphoneXcristian.vpn
10.8.0.3 iphoneXcristian.vpn
-rw-r--r-- 1 root root 234 ene 9 11:00 /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
}
-rw-r--r-- 1 root root 75 dic 24 02:49 /etc/pihole/whitelist.txt
stats.gc-apple.com.akadns.net
stats.gc.apple.com
stats.gc.fe.apple-dns.net
*** [ DIAGNOSING ]: contents of /etc/dnsmasq.d
-rw-r--r-- 1 root root 1419 ene 9 11:00 /etc/dnsmasq.d/01-pihole.conf
addn-hosts=/etc/pihole/gravity.list
addn-hosts=/etc/pihole/black.list
addn-hosts=/etc/pihole/local.list
user=pihole
group=pihole
localise-queries
no-resolv
cache-size=10000
log-queries
log-facility=/var/log/pihole.log
local-ttl=2
log-async
server=192.168.0.1
except-interface=nonexisting
*** [ DIAGNOSING ]: contents of /etc/lighttpd
-rw-r--r-- 1 root root 3102 ene 9 11:00 /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 1704 ene 9 11:00 /etc/cron.d/pihole
38 4 * * 7 root PATH="$PATH:/usr/local/bin/" pihole updateGravity >/var/log/pihole_updateGravity.log || cat /var/log/pihole_updateGravity.log
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
26 17 * * * 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 11023 ene 12 04:18 /var/log/lighttpd/error.log
2019-01-06 06:25:03: (server.c.1534) logfiles cycled UID = 0 PID = 26954
2019-01-06 07:12:40: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning: unlink(../custom_disable_timer): No such file or directory in /var/www/html/admin/api.php on line 49
2019-01-07 01:43:45: (mod_fastcgi.c.2909) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: unix:/var/run/lighttpd/php.socket-0
2019-01-07 01:23:19: (log.c.217) server started
2019-01-07 01:23:19: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2019-01-07 02:04:14: (log.c.217) server started
2019-01-07 02:04:14: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2019-01-07 02:28:52: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning: unlink(../custom_disable_timer): No such file or directory in /var/www/html/admin/api.php on line 74
2019-01-07 09:09:30: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning: unlink(../custom_disable_timer): No such file or directory in /var/www/html/admin/api.php on line 49
2019-01-07 10:17:12: (log.c.217) server started
2019-01-07 10:17:12: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2019-01-07 10:38:17: (log.c.217) server started
2019-01-07 10:38:17: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2019-01-07 11:25:23: (log.c.217) server started
2019-01-07 11:25:23: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2019-01-07 11:48:08: (mod_fastcgi.c.2909) connection was dropped after accept() (perhaps the fastcgi process died), write-offset: 0 socket: unix:/var/run/lighttpd/php.socket-0
2019-01-07 13:21:20: (server.c.1828) server stopped by UID = 0 PID = 1
2019-01-07 13:24:39: (log.c.217) server started
2019-01-07 13:24:39: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2019-01-07 13:25:10: (server.c.1828) server stopped by UID = 0 PID = 1
2019-01-07 13:24:39: (log.c.217) server started
2019-01-07 13:24:39: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2019-01-07 16:19:30: (server.c.1828) server stopped by UID = 0 PID = 1
2019-01-07 16:22:32: (log.c.217) server started
2019-01-07 16:22:32: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
*** [ DIAGNOSING ]: contents of /var/log
-rw-r--r-- 1 pihole pihole 9084 ene 12 13:20 /var/log/pihole-FTL.log
-----head of pihole-FTL.log------
[2019-01-12 00:55:02.342] Using log file /var/log/pihole-FTL.log
[2019-01-12 00:55:02.342] ########## FTL started! ##########
[2019-01-12 00:55:02.342] FTL branch: master
[2019-01-12 00:55:02.342] FTL version: v4.1.2
[2019-01-12 00:55:02.342] FTL commit: b06eedf
[2019-01-12 00:55:02.342] FTL date: 2018-12-21 14:43:34 -0600
[2019-01-12 00:55:02.342] FTL user: pihole
[2019-01-12 00:55:02.342] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2019-01-12 00:55:02.342] SOCKET_LISTENING: only local
[2019-01-12 00:55:02.342] AAAA_QUERY_ANALYSIS: Show AAAA queries
[2019-01-12 00:55:02.343] MAXDBDAYS: max age for stored queries is 365 days
[2019-01-12 00:55:02.343] RESOLVE_IPV6: Resolve IPv6 addresses
[2019-01-12 00:55:02.343] RESOLVE_IPV4: Resolve IPv4 addresses
[2019-01-12 00:55:02.343] DBINTERVAL: saving to DB file every minute
[2019-01-12 00:55:02.343] DBFILE: Using /etc/pihole/pihole-FTL.db
[2019-01-12 00:55:02.343] MAXLOGAGE: Importing up to 24.0 hours of log data
[2019-01-12 00:55:02.343] PRIVACYLEVEL: Set to 0
[2019-01-12 00:55:02.343] IGNORE_LOCALHOST: Show queries from localhost
[2019-01-12 00:55:02.343] BLOCKINGMODE: Pi-hole's IP + NODATA-IPv6 for blocked domains
[2019-01-12 00:55:02.343] REGEX_DEBUGMODE: Inactive
[2019-01-12 00:55:02.343] ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2019-01-12 00:55:02.343] DBIMPORT: Importing history from database
[2019-01-12 00:55:02.343] PIDFILE: Using /var/run/pihole-FTL.pid
[2019-01-12 00:55:02.343] PORTFILE: Using /var/run/pihole-FTL.port
[2019-01-12 00:55:02.343] SOCKETFILE: Using /var/run/pihole/FTL.sock
[2019-01-12 00:55:02.343] WHITELISTFILE: Using /etc/pihole/whitelist.txt
[2019-01-12 00:55:02.343] BLACKLISTFILE: Using /etc/pihole/black.list
[2019-01-12 00:55:02.343] GRAVITYFILE: Using /etc/pihole/gravity.list
[2019-01-12 00:55:02.343] REGEXLISTFILE: Using /etc/pihole/regex.list
[2019-01-12 00:55:02.344] SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2019-01-12 00:55:02.344] AUDITLISTFILE: Using /etc/pihole/auditlog.list
[2019-01-12 00:55:02.344] Finished config file parsing
[2019-01-12 00:55:02.355] Compiled 0 Regex filters and 3 whitelisted domains in 11.2 msec (0 errors)
[2019-01-12 00:55:02.479] Database successfully initialized
[2019-01-12 00:55:02.533] Notice: Increasing queries struct size from 0 to 10000
-----tail of pihole-FTL.log------
[2019-01-12 04:18:40.625] SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2019-01-12 04:18:40.625] AUDITLISTFILE: Using /etc/pihole/auditlog.list
[2019-01-12 04:18:40.625] Finished config file parsing
[2019-01-12 04:18:40.637] Compiled 0 Regex filters and 3 whitelisted domains in 12.2 msec (0 errors)
[2019-01-12 04:18:40.769] Database successfully initialized
[2019-01-12 04:18:40.829] Notice: Increasing queries struct size from 0 to 10000
[2019-01-12 04:18:40.829] Notice: Increasing domains struct size from 0 to 1000
[2019-01-12 04:18:40.829] Notice: Increasing clients struct size from 0 to 10
[2019-01-12 04:18:40.829] Notice: Increasing overTime struct size from 0 to 100
[2019-01-12 04:18:40.829] New forward server: 192.168.0.1 (0/0)
[2019-01-12 04:18:40.829] Notice: Increasing forwarded struct size from 0 to 4
[2019-01-12 04:18:40.883] Notice: Increasing clients struct size from 10 to 20
[2019-01-12 04:18:40.989] Notice: Increasing queries struct size from 10000 to 20000
[2019-01-12 04:18:41.015] Notice: Increasing domains struct size from 1000 to 2000
[2019-01-12 04:18:41.152] Notice: Increasing queries struct size from 20000 to 30000
[2019-01-12 04:18:41.186] Notice: Increasing overTime struct size from 100 to 200
[2019-01-12 04:18:41.276] Notice: Increasing queries struct size from 30000 to 40000
[2019-01-12 04:18:41.302] Imported 32110 queries from the long-term database
[2019-01-12 04:18:41.303] -> Total DNS queries: 32110
[2019-01-12 04:18:41.303] -> Cached DNS queries: 10210
[2019-01-12 04:18:41.303] -> Forwarded DNS queries: 18578
[2019-01-12 04:18:41.303] -> Exactly blocked DNS queries: 3322
[2019-01-12 04:18:41.303] -> Unknown DNS queries: 0
[2019-01-12 04:18:41.303] -> Unique domains: 1760
[2019-01-12 04:18:41.303] -> Unique clients: 16
[2019-01-12 04:18:41.303] -> Known forward destinations: 1
[2019-01-12 04:18:41.303] Successfully accessed setupVars.conf
[2019-01-12 04:18:41.340] PID of FTL process: 1046
[2019-01-12 04:18:41.340] Listening on port 4711 for incoming IPv4 telnet connections
[2019-01-12 04:18:41.340] Listening on port 4711 for incoming IPv6 telnet connections
[2019-01-12 04:18:41.341] Listening on Unix socket
[2019-01-12 04:18:41.350] Compiled 0 Regex filters and 3 whitelisted domains in 1.0 msec (0 errors)
[2019-01-12 04:18:41.374] /etc/pihole/black.list: parsed 1 domains (took 0.1 ms)
[2019-01-12 04:19:05.541] /etc/pihole/gravity.list: parsed 2006969 domains (took 24162.2 ms)
[2019-01-12 13:20:08.732] Notice: Increasing overTime struct size from 200 to 300
*** [ DIAGNOSING ]: Locale
LANG=es_ES.UTF-8
*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r-- 1 pihole pihole 6917223 ene 12 17:00 /var/log/pihole.log
-----head of pihole.log------
Jan 12 00:55:02 dnsmasq[1053]: started, version pi-hole-2.79 cachesize 10000
Jan 12 00:55:02 dnsmasq[1053]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify
Jan 12 00:55:02 dnsmasq[1053]: using nameserver 192.168.0.1#53
Jan 12 00:55:02 dnsmasq[1053]: read /etc/hosts - 5 addresses
Jan 12 00:55:03 dnsmasq[1053]: read /etc/pihole/local.list - 6 addresses
Jan 12 00:55:03 dnsmasq[1053]: read /etc/pihole/black.list - 2 addresses
Jan 12 00:55:23 dnsmasq[1053]: read /etc/pihole/gravity.list - 4013938 addresses
Jan 12 00:55:23 dnsmasq[1053]: query[A] router14.teamviewer.com from 127.0.0.1
Jan 12 00:55:23 dnsmasq[1053]: forwarded router14.teamviewer.com to 192.168.0.1
Jan 12 00:55:23 dnsmasq[1053]: query[AAAA] router14.teamviewer.com from 127.0.0.1
Jan 12 00:55:23 dnsmasq[1053]: forwarded router14.teamviewer.com to 192.168.0.1
Jan 12 00:55:23 dnsmasq[1053]: query[A] plex.tv from 127.0.0.1
Jan 12 00:55:23 dnsmasq[1053]: forwarded plex.tv to 192.168.0.1
Jan 12 00:55:23 dnsmasq[1053]: query[AAAA] plex.tv from 127.0.0.1
Jan 12 00:55:23 dnsmasq[1053]: forwarded plex.tv to 192.168.0.1
Jan 12 00:55:23 dnsmasq[1053]: query[A] plex.tv from 127.0.0.1
Jan 12 00:55:23 dnsmasq[1053]: forwarded plex.tv to 192.168.0.1
Jan 12 00:55:23 dnsmasq[1053]: query[AAAA] plex.tv from 127.0.0.1
Jan 12 00:55:23 dnsmasq[1053]: forwarded plex.tv to 192.168.0.1
Jan 12 00:55:23 dnsmasq[1053]: query[A] router14.teamviewer.com from 127.0.0.1
********************************************
********************************************
[✓] ** FINISHED DEBUGGING! **