Graphs does not display until host restart

Expected Behaviour:

The graphs are displayed in the web UI after start the Pi where Pi-hole is installed.

Actual Behaviour:

I switch off the Pi running Pi-hole with normal shutdown if I'm not at home for some time. The graphs are not displayed in any web UI (Chrome, FF on Windows or Safari on an iPad) after start the Pi. This does not recover if I let the Pi run for some days. Restarting a browser or client does not help to display the graphs. That I expect it's more a Pi-hole related issue.

The only way to get the Graphs be shown is to restart the Pi with "shutdown -r". The graphs are displayed on all devices afterwards.

The following debug token is provided after a restart with graphs working.

Debug Token:

https://tricorder.pi-hole.net/96uu9lr0y7

Edit:
A Debug Token after a new start after some days while the graphs are not working:
https://tricorder.pi-hole.net/pbf5m2uhbj

DNSSEC enabled ?

grep DNSSEC /etc/pihole/setupVars.conf

Check date/time that may be incorrect because of the chicken egg dilemma on SBC's without a real time clock:

When you start Pi-Hole, the information to populate the dashboard is read from the long term database at /etc/pihole/pihole-FTL.db. The default is to read 24 hours of data.

If there is a problem with your database, then this can affect this process. In your debug log, Pi-Hole is doing a number of activities to prune the database.

   [2019-12-01 18:00:00.112 674] Notice: Database size is 134.03 MB, deleted 891 rows
   [2019-12-01 19:00:00.157 674] Notice: Database size is 134.03 MB, deleted 346 rows
   [2019-12-01 20:00:00.115 674] Notice: Database size is 134.03 MB, deleted 630 rows

As a test, I would temporarily move the long term database and restart FTL. If the problem resolves after 24 hours of data collection, then it would indicate a problem with the existing database.

sudo service pihole-FTL stop
sudo mv /etc/pihole/pihole-FTL.db /etc/pihole/pihole-FTL-old.db
sudo service pihole-FTL start
1 Like

Hi,

back at home today. DNSSEC is disabled:

pi@pihole:~ $ grep DNSSEC /etc/pihole/setupVars.conf
DNSSEC=false

I'll try the FTL DB stuff now. Report back tomorrow.

Edit: The graphs is displayed at the moment. But it's unclear if this is because the DB is changed. Or if this is the same behavior as the usual restart. Lets see later.

Hi,

I did some investigations after the problem is still happening.

I started monitoring the requests to the PiHole Server with the browsers web dev tools. Only one URL was requested frequently: 'http://192.168.2.253/admin/api.php?summary'

Scrolling back to the top of the requests (after reload the whole page) shows a request '/admin/api.php?overTimeData10mins' returning '{"domains_over_time":{"1575802500":3473},"ads_over_time":{"1575802500":1190}}'. Checking the timestamp shows a date 'Sunday, December 8, 2019 10:55:00 AM' which is incorrect.

Restarting the 'pihole-FTL' service on the PI shows other results for the '/admin/api.php?overTimeData10mins' request with current time stamps:
'{"domains_over_time":{"1576182900":34,"1576183500"'

And two other requests are now active frequently from the client:
'/admin/api.php?summaryRaw&topItems'
'/admin/api.php?summaryRaw&getQuerySources&topClientsBlocked'

I think the problem is a mix of restart the PI and internal time handling of the programs:

  • the Pi does not have a HW clock running while it's powered off
  • the clock is the last value on shutdown
  • the PI and some time sync to set the hw clock is starting in parallel
  • storing the DNS lookup events (including good, bad decision) is running with the current time after the startup
  • looking up values from the DB is using the OLD date and it does not update with the current setting from the HW clock

Question:
Is it possible to start the 'pihjole-FTL' after the hwclock.sh is run on a PI?

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