tl;dr: Issue already solved, just small question regarding handling the aftermath at the end. Long description only for the error messages being searchable and maybe for the devs for fixing the bug(s).
So today I updated my main Pi-hole installation and thought I were prepared for everything... it turned out: No
Sadly the installer broke during update:
[✓] Migrating Pi-hole configuration to version 6
Migrating config to Pi-hole v6.0 format
Reading legacy config files from /etc/pihole/pihole-FTL.conf
[...]
Moving /etc/pihole/pihole-FTL.conf to /etc/pihole/migration_backup_v6/pihole-FTL.conf
Migrating config from /etc/pihole/setupVars.conf
[...]
Moved /etc/pihole/setupVars.conf to /etc/pihole/migration_backup_v6/setupVars.conf
setupVars.conf migration complete
Moving /etc/pihole/custom.list to /etc/pihole/migration_backup_v6/custom.list
Config initialized with webserver ports 8080 (HTTP) and 443 (HTTPS), IPv6 support is enabled
Wrote config file:
- 152 total entries
- 133 entries are default
- 19 entries are modified
- 0 entries are forced through environment
Config file written to /etc/pihole/pihole.toml
Trying to copy a NULL (L) string in write_dnsmasq_config() (/app/src/config/dnsmasq_config.c:301)
Unable to update dnsmasq configuration: (null)
[i] Testing if systemd-resolved is enabled
[i] Systemd-resolved is not enabled
[i] Upgrading gravity database from version 15 to 16
[i] Upgrading gravity database from version 16 to 17
[i] Upgrading gravity database from version 17 to 18
[i] Upgrading gravity database from version 18 to 19
[i] Restarting services...
[✓] Enabling pihole-FTL service to start on reboot...
[✓] Restarting pihole-FTL service...
[✓] Migrating the list's cache directory to new location
[✓] Deleting existing list cache
[✗] DNS resolution is currently unavailable
[i] Waiting until DNS resolution is available...
Then only more dots appeared in an endless loop, until I finally cancelled the script:
[i] User-abort detected
[✓] Cleaning up stray matter
[✓] FTL is listening on port 53
[✓] UDP (IPv4)
[✓] TCP (IPv4)
[✓] UDP (IPv6)
[✓] TCP (IPv6)
[✓] Pi-hole blocking is enabled
Unable to complete update, please contact Pi-hole Support
The error message could also be seen in the logs. FTL was up, but DNS didn't work.
$ sudo systemctl status pihole-FTL.service
? pihole-FTL.service - Pi-hole FTL
Loaded: loaded (/etc/systemd/system/pihole-FTL.service; enabled; preset: enabled)
Active: active (running) since Wed 2025-02-26 22:11:53 CET; 9min ago
Process: 591420 ExecStartPre=/opt/pihole/pihole-FTL-prestart.sh (code=exited, status=0/SUCCESS)
Main PID: 591437 (pihole-FTL)
Tasks: 8 (limit: 9256)
Memory: 99.7M
CPU: 17.549s
CGroup: /system.slice/pihole-FTL.service
+-591437 /usr/bin/pihole-FTL -f
Feb 26 22:11:53 [servername] pihole-FTL[591437]: 2025-02-26 22:11:53.570 CET [591437M] INFO: - 133 entries are default
Feb 26 22:11:53 [servername] pihole-FTL[591437]: 2025-02-26 22:11:53.570 CET [591437M] INFO: - 19 entries are modified
Feb 26 22:11:53 [servername] pihole-FTL[591437]: 2025-02-26 22:11:53.570 CET [591437M] INFO: - 0 entries are forced through environment
Feb 26 22:11:53 [servername] pihole-FTL[591437]: 2025-02-26 22:11:53.571 CET [591437M] ERROR: Trying to copy a NULL (L) string in write_dnsmasq_config(>
Feb 26 22:11:55 [servername] pihole-FTL[591437]: 2025-02-26 22:11:53.571 CET [591437M] ERROR: Unable to update dnsmasq configuration: (null)
Feb 26 22:11:55 [servername] dnsmasq[591437]: started, version pi-hole-v2.91rc5 cachesize 150
Feb 26 22:11:55 [servername] dnsmasq[591437]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN2 DHCP DHCPv6 Lua TFTP no-conntrack ipse>
Feb 26 22:11:55 [servername] dnsmasq[591437]: reading /etc/resolv.conf
Feb 26 22:11:55 [servername] dnsmasq[591437]: ignoring nameserver 127.0.0.1 - local interface
Feb 26 22:11:55 [servername] dnsmasq[591437]: read /etc/hosts - 8 names
During debugging I luckily got a better error message:
Unable to update dnsmasq configuration: DHCP range start address is larger than or equal to the end address
... and yes, I intentionally set the start address equal to the end address. This was a valid (= accepted from the web interface) config in v5
I did this intentionally, because I put all my DHCP configuration in a separate file in /etc/dnsmasq.d/
- where I defined different IP address ranges (and configs) for different network interfaces, which I am not able to do so via web interface.
So it somehow is an edge case, but on the other hand it was a valid config in v5, so the installer should be able to upgrade it to v6 without locking up.
I already fixed the config ( sudo pihole-FTL --config misc.etc_dnsmasq_d true
for the fast fix) and my network is up again.
The only problem I have left is that the web interface tells me, I'm not up to date:
Runing the updater a second time tells me I'm up to date
$ sudo pihole -up
[✓] Supported OS detected
[✓] Update local cache of available packages
[✓] Building dependency package pihole-meta.deb
[✓] Installing Pi-hole dependency package
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: up to date
[✓] Everything is up to date!
Web interface also looks like a v6 web interface - but still tells me it is not up to date.
How do I recover from here?