After a update Pi-Hole shows no stats Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Niaz
Posts: 14
Joined: Mon Jan 11, 2021 8:28 pm

Re: After a update Pi-Hole shows no stats

Post by Niaz »

Yeah, I checked that. Yet, after every reboot I have to run it manually a restart FTL.

My understanding of Linux is very shallow, so I'm only explaining the functional workaround I managed to discover. No idea why is it happening as it does.
User avatar
Joulinar
Posts: 5091
Joined: Sat Nov 16, 2019 12:49 am

Re: After a update Pi-Hole shows no stats

Post by Joulinar »

as I said, the system time should update itself on a reboot. it can be checked with date command. It should display correct system time right after boot. As well, systemd-timesyncd should have need succeeded
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Barney
Posts: 14
Joined: Sat Aug 01, 2020 10:39 pm

Re: After a update Pi-Hole shows no stats

Post by Barney »

Joulinar wrote: Fri Feb 19, 2021 3:55 pm as you can see, time sync succeeded on reboot. Means you system should have an actual system time after reboot
That's only half of the truth: timesyncd syncs only once and then ...

Code: Select all

Feb 19 09:41:54 N2plus systemd[1]: systemd-timesyncd.service: Succeeded.
Feb 19 09:41:54 N2plus systemd[1]: Stopped Network Time Synchronization.
... exits.

I think the OP wants to start timesyncd on every boot and to keep timesyncd continously syncing. Therefore he needs to enable the service with the following command:

Code: Select all

systemctl enable systemd-timesyncd
User avatar
Joulinar
Posts: 5091
Joined: Sat Nov 16, 2019 12:49 am

Re: After a update Pi-Hole shows no stats

Post by Joulinar »

@Barney

that's not correct. The time sync succeeded and the service stop. That's the expected behaviour.

To keep time in sync, there is a con job scheduled in background. According OP, he has set CONFIG_NTP_MODE=2 inside /boot/dietpi.txt (default value). Means, time sync is done on boot as well as on daily basis by /etc/cron.daily/dietpi.

You can check the daily time sync be running journalctl -u systemd-timesyncd.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Barney
Posts: 14
Joined: Sat Aug 01, 2020 10:39 pm

Re: After a update Pi-Hole shows no stats

Post by Barney »

Joulinar wrote: Sun Feb 21, 2021 9:56 pm @Barney

that's not correct. The time sync succeeded and the service stop. That's the expected behaviour.
Maybe this is the expected behaviour under DietPi, but it's not the expected behaviour under a Debian/Armbian system. The normal and expected behaviour under a Debian/Armbian system looks like this:

Code: Select all

● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: active (running) since Tue 2021-02-23 11:16:28 CET; 6h ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 726 (systemd-timesyn)
   Status: "Synchronized to time server 10.91.25.1:123 (10.91.25.1)."
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
           └─726 /lib/systemd/systemd-timesyncd

Feb 23 11:16:28 stx systemd[1]: Starting Network Time Synchronization...
Feb 23 11:16:28 stx systemd[1]: Started Network Time Synchronization.
Feb 23 11:16:30 stx systemd-timesyncd[726]: Synchronized to time server 10.91.25.1:123 (10.91.25.1).
Feb 23 13:16:29 stx systemd-timesyncd[726]: Synchronized to time server 10.91.25.1:123 (10.91.25.1).
Feb 23 15:05:06 stx systemd-timesyncd[726]: Synchronized to time server 10.91.25.1:123 (10.91.25.1).
Feb 23 16:52:19 stx systemd-timesyncd[726]: Synchronized to time server 10.91.25.1:123 (10.91.25.1).
The normal and expected behaviour under a Debian/Armbian system is to keep on running and continously syncing.

I hate it, when someone changes something without any need, just to be different from main stream. That's the reason, why I'm leaving DietPi and stay with Armbian in the future.
User avatar
Joulinar
Posts: 5091
Joined: Sat Nov 16, 2019 12:49 am

Re: After a update Pi-Hole shows no stats

Post by Joulinar »

Well you can change settings easily to be synchronised on an hourly basis. Which is even more that your so called standard.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Barney
Posts: 14
Joined: Sat Aug 01, 2020 10:39 pm

Re: After a update Pi-Hole shows no stats

Post by Barney »

Joulinar wrote: Tue Feb 23, 2021 6:44 pm Well you can change settings easily to be synchronised on an hourly basis. Which is even more that your so called standard.
The standard is to sync, when it is needed. So it depends on the accuracy of your internal clock: the more precise the clock, the longer the interval to sync. That's always better than the stupid hourly sync.
Niaz
Posts: 14
Joined: Mon Jan 11, 2021 8:28 pm

Re: After a update Pi-Hole shows no stats

Post by Niaz »

FYI, after upgrade to 7.02 the problem went away.
Post Reply