Cannot access web interface after PiHole 6 update

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

I'm trying to access the PiHole web UI on port 80 after running pihole -u to upgrade to V6.

I disabled LightHTTPd in the options when updating

Now the Web UI doesn't appear to work.

http://10.0.0.4/admin/login gives me a 404 error page

Error 404: Not Found
Not found

Port 8080 gives me connection refused.

I tried restarting the Ubuntu 24.04 VM. Nothing else runs on this VM.

I tried to no avail

sudo killall pihole-FTL
sudo rm /dev/shm/FTL*
sudo systemctl restart pihole-FTL

sudo chmod 755 /var/www
sudo chmod 755 /var/www/html

Both of these haven't helped. Debug upload is below:

Debug Token:

https://tricorder.pi-hole.net/Brjz95ST/

Your debug log shows Pi-hole web server was correctly started and it is using port 80:

*** [ DIAGNOSING ]: Ports in use
(...)
[✓] tcp:0.0.0.0:80 is in use by pihole-FTL

webserver.log:

[2025-03-02 21:28:44.927 GMT 2807] Initializing HTTP server on ports "80o,443os,[::]:80o,[::]:443os"

FTL.log:

2025-03-02 21:28:44.929 GMT [2807M] INFO: Web server ports:
2025-03-02 21:28:44.929 GMT [2807M] INFO:   - 0.0.0.0:80 (HTTP, IPv4, optional)
2025-03-02 21:28:44.929 GMT [2807M] INFO:   - 0.0.0.0:443 (HTTPS, IPv4, optional)
2025-03-02 21:28:44.929 GMT [2807M] INFO:   - [::]:80 (HTTP, IPv6, optional)
2025-03-02 21:28:44.929 GMT [2807M] INFO:   - [::]:443 (HTTPS, IPv6, optional)

Also, no other web servers are running
Nothing seems wrong in the log.

Questions:

Hi,
I tried a different device and browser (firefox in incognito) and got the same result :frowning:

https://10.0.0.4/admin -> redirects to https://10.0.0.4/admin/login but gives me the same 404 not found error

Error 404: Not Found
Not found

I have resolved the issue - it was a corrupted web ui folder somehow!

root@pihole:/opt/pihole# ./update.sh
[✓] 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
error: inflate: data stream error (invalid stored block lengths)
fatal: packed object c4e173d8ac2495ca1c20ae3613009768438a1d12 (stored in .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack) is corrupt
fatal: fetch-pack: invalid index-pack output

Error: Unable to update local repository. Contact Pi-hole Support.
root@pihole:/opt/pihole#

I reverse engineered the script at pi-hole/advanced/Scripts/update.sh at 567bb724b18bf174f033d0b8b289cc44a5e9c8eb · pi-hole/pi-hole · GitHub

And saw the web-ui component was next in the list of errors. I did the following in the web ui directory:

root@pihole:/var/www/html/admin# git fetch
remote: Enumerating objects: 6385, done.
remote: Counting objects: 100% (5847/5847), done.
remote: Compressing objects: 100% (2574/2574), done.
error: inflate: data stream error (invalid stored block lengths)
fatal: packed object c4e173d8ac2495ca1c20ae3613009768438a1d12 (stored in .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack) is corrupt
fatal: fetch-pack: invalid index-pack output
root@pihole:/var/www/html/admin# git fetch --verbose
POST git-upload-pack (383 bytes)
POST git-upload-pack (gzip 2114 to 1067 bytes)
remote: Enumerating objects: 6385, done.
remote: Counting objects: 100% (5847/5847), done.
remote: Compressing objects: 100% (2574/2574), done.
error: inflate: data stream error (invalid stored block lengths)
fatal: packed object c4e173d8ac2495ca1c20ae3613009768438a1d12 (stored in .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack) is corrupt
fatal: fetch-pack: invalid index-pack output

root@pihole:/var/www/html/admin# git fsck --full
Checking object directories: 100% (256/256), done. error: .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack pack checksum mismatch error: index CRC mismatch for object 0aba561de4dccb0f40252e814d15cbc51afd417d from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 1048496 error: cannot unpack 0aba561de4dccb0f40252e814d15cbc51afd417d from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 1048496 error: index CRC mismatch for object cb0ea772fab28d4a497075ccac66682e1bb45686 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 1068561 error: unknown object type 0 at offset 1068561 in .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack error: cannot unpack cb0ea772fab28d4a497075ccac66682e1bb45686 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 1068561 error: index CRC mismatch for object cfdf5ccc46f70fd2c89b4a9b437e66b324dcab34 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 1084523 error: unknown object type 0 at offset 1084523 in .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack
error: cannot unpack cfdf5ccc46f70fd2c89b4a9b437e66b324dcab34 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 1084523
error: index CRC mismatch for object c4e173d8ac2495ca1c20ae3613009768438a1d12 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 2065345
error: inflate: data stream error (invalid stored block lengths) error: cannot unpack c4e173d8ac2495ca1c20ae3613009768438a1d12 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 2065345 error: index CRC mismatch for object d36c4523a4f79b63385e8339d7e3b3e136a11ae1 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 2114420 error: unknown object type 0 at offset 2114420 in .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack error: cannot unpack d36c4523a4f79b63385e8339d7e3b3e136a11ae1 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 2114420 error: index CRC mismatch for object e4677046ace857e1a43a9038fd22cac160b0fd83 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 2182094
error: unknown object type 0 at offset 2182094 in .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack
error: cannot unpack e4677046ace857e1a43a9038fd22cac160b0fd83 from .git/objects/pack/pack-10774ecb85ddb95f05f011ababdebed67b9a55dc.pack at offset 2182094
Checking objects: 100% (1354/1354), done.

The git fsck failing showed a corrupt repository so I researched how to repair a git repository and found the tool git-repair - installed and ran this with the --force flag and this repaired the repository.

Then ran git pull and the repository was now healthy. My web UI also works now!!

Probably a silly feature request but would it be worthwhile to add a git fsck to all the pihole stores in the debug script?