The issue I am facing:
The admin page shows no data, and this is the first time I've experienced this. Pihole is suppressing ads, so it's functioning, but on the dashboard, Statistics of Total Queries, Ads Blocked, Percentage blocked show only '---'. (And it's the same in Chrome and Firefox.)
Long term data also shows no information. Instead it shows empty Graphics and Top Lists, and an error alert when clicking Query log.
Items under Tools provide no information (except Generate debug log). They're either empty or give an error alert.
Details about my system:
I've been running pihole on a Raspberry pi4 (Buster) for years. Server is Apache2.
lighttpd is installed but it keeps stopping if I try to start it so I changed lighttpd port to 8080 in /etc/lighttpd/lighttpd.conf
server. port = 8080
What I have changed since installing Pi-hole:
Nothing. I've updated pi OS and pihole, but I do that regularly.
This happened just after I did a clean re-install of Windows 10. I don't know how (or even if) that could be related to what's happening on a Raspberry pi.
Debug Token:
9Y0dmL3c
Here's more detail of what I've tried:
pihole -c shows that it's active.
I've updated the pi, and pihole. I've done a pihole repair. The admin page still looks the same.
The Query Log shows actual blocked and OK domains, but Long-term data & Query Log shows none, and says an unknown error occurred while loading the data and I need to increase PHP memory limit. I did that to 256MB, but that didn't help.
I click on Pi-hole diagnosis in left hand navigation. Alert pops up:
DataTables warning: table id=messagesTable - Ajax error. For more information about this error, please see 7. Warning: Ajax error
Followed instructions there and found the following via the developer console:
ethicalads.min.js:1
Failed to load resource: net::ERR_NAME_NOT_RESOLVED
ssl.google-analytics.com/ga.js:1
Failed to load resource: net::ERR_NAME_NOT_RESOLVED
dynamic.php?comments…2Ftech-notes%2F7:17 Uncaught ReferenceError: ethicalads is not defined
Next I generated a debug log and found the following:
- Gateway issue:---------------------------------------------------------
[i] Default IPv4 gateway: 192.168.0.1
192.168.0.1
* Pinging 192.168.0.1
192.168.0.1...
[✗] Gateway did not respond. (https://discourse.pi-hole.net/t/why-is-a-default-gateway-important-for-pi-hole/3546)
but from command line there's no problem accessing it:
pi@raspberrypi:~ $ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.684 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.638 ms
^C
The pi is connected to the router with an Ethernet cable, not WiFi.
- lighttpd issues:---------------------------------------------------------
[✗] lighttpd daemon is failed
From online suggestions here 18.04 - Failed to start Lighttpd Daemon on boot - Ask Ubuntu,
I saw that installing gamin fixed this for someone. Didn't for me but the above is for Ubuntu anyway.
Also, that chown -R www-data:www-data /var/log/lighttpd/ might fix it. Again it didn't for me.
tried to purge and reinstall:
sudo apt-get purge lighttpd
sudo apt-get install lighttpd
sudo pihole -r
No difference.
/var/log/lighttpd/error-pihole.log contains this:
2022-08-05 21:27:15: (server.c.1464) server started (lighttpd/1.4.53)
2022-08-05 21:27:15: (server.c.1493) WARNING: unknown config-key: alias.url (ignored)
The repair showed all green ticks except for these:
[i] Target: https://mirror1.malwaredomains.com/files/justdomains
[✗] Status: Not found
[✗] List download failed: no cached list available
[i] Target: https://hosts-file.net/ad_servers.txt
[✗] Status: Not found
[✗] List download failed: no cached list available
[✗] tcp:*:80 is in use by apache2 (Prerequisites - Pi-hole documentation)
port for lighttpd was 80, as was apache2, so there's a conflict. Changed lighttpd port to 8080 in
/etc/lighttpd/lighttpd.conf
server. port = 8080
rebooted the pi, and trying to start lighttpd gives the same error message
*** [ DIAGNOSING ]: Dashboard and block page
[✗] Block page X-Header: X-Header does not match or could not be retrieved.
HTTP/1.1 200 OK
Date: Fri, 05 Aug 2022 07:53:00 GMT
Server: Apache/2.4.38 (Raspbian)
Content-Type: text/html;charset=UTF-8
[✗] Web interface X-Header: X-Header does not match or could not be retrieved.
HTTP/1.1 200 OK
Date: Fri, 05 Aug 2022 07:53:00 GMT
Server: Apache/2.4.38 (Raspbian)
Set-Cookie: PHPSESSID=k37rn4hpkflkb7gb45javd66sa; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Finally I moved pihole-FTL.db to my own directory and did
service pihole-FTL start
After that, the admin page looked the same, Pi-hole diagnosis gave the same error alert, and a new run of Generate debug log showed the same errors.
To me it seems likely that all these errors come from one issue, but I haven't been able to find any suggestion that work on here or on reddit.
Debug token 9Y0dmL3c