pi-hole / web

Pi-hole Dashboard for stats and more
https://pi-hole.net
Other
2.03k stars 559 forks source link

Broken Dashboard Page #3159

Open ColeBardin opened 5 hours ago

ColeBardin commented 5 hours ago

Versions

Pi-hole version is v5.18.3 (Latest: N/A) web version is v5.21 (Latest: N/A) FTL version is v5.25.2 (Latest: N/A)

Platform

Expected behavior

The dashboard layout to stay consistent between reboots and navigation. I expect to see both 'Total queries over last 24 hours' and 'Client activity over last 24 hours' charts.

Actual behavior / bug

The 'Client activity over last 24 hours' chart disappears and the 'Total queries over last 24 hours' does not display any data. It only has the X range of only 1 hour and Y range of [0,1]. Reopening the web page does not solve the problem. The broken chart also does not every display data, it just changes the X range as time moves on

Steps to reproduce

Steps to reproduce the behavior:

  1. Reboot Raspberry Pi
  2. Open web page & sign in (normal graphs are shown but with no data since it just rebooted)
  3. Navigate to Tools > Update Gravity. (other pages sometimes trigger it, but this one seems to be more reliable. It happens without even hitting Update)
  4. Return to dashboard
  5. Note broken charts.

Debug Token

Screenshots

Image

Additional context

Sometimes this doesn't happen. I had everything working perfectly fine for a few months. Everything was very solid. But my power went out and when I rebooted the Raspberry Pi, it breaks the web page every time I access it. I have tried rebooting the device many times, but it seems to be doing it reliably now.

rdwebdesign commented 4 hours ago

Your debug log shows the computer clock was not correct when FTL was started and suddenly it was changed to the current time:

(...)
[1969-12-31 19:00:28.688 223/T355] ADLIST WARNING: Adlist with ID 6 (https://small.oisd.nl/rpz) was inaccessible during last gravity run
[1969-12-31 19:00:28.705 223/T355] Blocking status is enabled
[2024-10-24 17:02:15.138 223/T356] ERROR: Trying to access query ID 15, but magic byte is 0
[2024-10-24 17:02:15.139 223/T356]        found in GC_thread() (src/gc.c:272)
[2024-10-24 17:02:23.590 223M] WARN: Found database entries in the future (2024-10-24 17:05:00 (1729803900), last timestamp for importing: 1969-12-31 19:05:00 (300)). Your over-time statistics may be incorrect (found in src/dnsmasq_interface.c:699)
(...)

If this happened before, it could mean the queries were stored using the wrong date (in the past) and when FTL tries to find the queries from the last 24h they are not there.

If you didn't install a Real Time Clock in your Raspberry Pi, you need to make sure the time is set before FTL is started.

You could try to install fake-hwclock. This program sets the initial time on every boot to some known value (stored before the last shutdown or reboot). This avoids the huge clock "jumps" before services such as ntp sets the correct time.