Every reboot pihole loses upstream dns server: no upstream dns servers configured
Leocraft1 opened this issue · 8 comments
Versions
Pi-hole version is v5.18.3 (Latest: v5.18.3)
web version is v5.21 (Latest: v5.21)
FTL version is v5.25.2 (Latest: v5.25.2)
Platform
- OS and version: Ubuntu server 24.04 LTS
- Platform: x64 processor, virtualized in docker container
Expected behavior
Pihole doesn't loose the upstream dns configuration
Actual behavior / bug
Pihole resets the upstream dns servers to nothing after the machine reboots.
I have this script that cleans the pihole stats every midnight AND every reboot by deleting pihole-FTL.db which still works.
The bug occurs since I updated to the latest version 2024.07.0, previously everything worked fine and it didn't loose any configuration.
The container is configured from casaos, however I linked the docker compose file it's using for inspection.
However, upon closer sight, pihole ONLY resets when the machine runs with crontab apparently 2 times this script (at midnight, but there is an auto update feature that makes him execute the same thing rebooting after it runs apt update && apt upgrade -y), if i reboot the computer by only doing sudo reboot it still maintains the old configuration.
Steps to reproduce
Steps to reproduce the behavior:
- Wait midnight
- The server reboots (auto update script)
- Wake up in the morning
- You lost internet connection
- Pihole shows 0 active clients with the no upstream dns servers configured error
- You just press save without touching anything on the settings
- It now works
Debug Token
- URL:
Screenshots
Additional context
Add any other context about the problem here.
i'm currently seeing if disabling the stat clearing at reboot makes any difference, but still have to wait until midnight
tested disabling the stat clearing at reboot (which makes the script run 2 times) and for now it didn't lost anything, maybe it was that?
Hi, sorry I didn't get to this sooner...
Wake up in the morning
You lost internet connection
This is exactly why you shouldn't attempt to auto update something as network-critical as your DNS server, besides which we don't release it so often that one would want to check nightly!
I have this script that cleans the pihole stats every midnight AND every reboot by deleting pihole-FTL.db
What does this scrip contain? I don't mean to come across as rude but perhaps this is a self-inflicted issue :) Why are you clearing down the stats nightly and deleting the database?
i'm not an enterprise environment, and I only have that server (which is just an old laptop). I'm auto updating it so i can forget about updates. I'm clearing the stats because i have a pretty dumb dhcp server that leaks out random ips and they reset at midnight so i get the chance to delete the old clients and i don't have like 30 clients active but only 14 actually doing something. I'm doing it based on this post: https://discourse.pi-hole.net/t/how-can-i-reset-all-pihole-stats/7749
have a pretty dumb dhcp server
Pi-hole has a not so dumb DHCP server build-in you could use....
It seems my ISP (iliad in italy) made it so complex that disablind the dhcp option in the router doesn't really disable it
Also for web configuration of the server issues i cannot change the network to host because otherwise i cannot access anymore any of the apps I use on my casaos (which is the same as pihole, as I said i have only one server)
Disabling clearing at reboot apparently solved this issue, maybe in the newer version pihole rebuilds the ftl right after it gets deleted, so deleting and immediately rebooting caused this issue. I'll close the issue now.