Start of webserver failed!. Web interface will not be available!

Hi,

I setup a wifi AP using latest RPI OS bookworm and installed pihole v6 as described here.

While the AP works well and I can connect my devices and browse etc. I can't reach piholes web interface. FTL-log shows some warnings and errors and indicate its start failed. Maybe someone has an idea? Thanks :slight_smile:

2023-10-13 18:16:29.018 [727M] INFO: ########## FTL started on bookworm! ##########
2023-10-13 18:16:29.048 [727M] INFO: FTL branch: development-v6
2023-10-13 18:16:29.048 [727M] INFO: FTL version: vDev-78a424b
2023-10-13 18:16:29.049 [727M] INFO: FTL commit: 78a424b5
2023-10-13 18:16:29.049 [727M] INFO: FTL date: 2023-10-13 09:57:58 +0200
2023-10-13 18:16:29.050 [727M] INFO: FTL user: pihole
2023-10-13 18:16:29.050 [727M] INFO: Compiled for linux/arm64/v8 (compiled on CI) using cc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924
2023-10-13 18:16:29.069 [727M] WARNING: copy_file(): Failed to open "/etc/pihole/config_backups/pihole.toml.1" for writing: Permission denied
2023-10-13 18:16:29.070 [727M] WARNING: Rotation /etc/pihole/pihole.toml -(COPY)> /etc/pihole/config_backups/pihole.toml.1 failed
2023-10-13 18:16:29.070 [727M] INFO: Writing config file
2023-10-13 18:16:29.082 [727M] WARNING: copy_file(): Failed to open "/etc/pihole/config_backups/dnsmasq.conf.1" for writing: Permission denied
2023-10-13 18:16:29.082 [727M] WARNING: Rotation /etc/pihole/dnsmasq.conf -(COPY)> /etc/pihole/config_backups/dnsmasq.conf.1 failed
2023-10-13 18:16:29.084 [727M] WARNING: copy_file(): Failed to open "/etc/pihole/config_backups/custom.list.1" for writing: Permission denied
2023-10-13 18:16:29.084 [727M] WARNING: Rotation /etc/pihole/custom.list -(COPY)> /etc/pihole/config_backups/custom.list.1 failed
2023-10-13 18:16:29.094 [727M] INFO: PID of FTL process: 727
2023-10-13 18:16:29.199 [727M] INFO: Database version is 13
2023-10-13 18:16:29.203 [727M] INFO: Database successfully initialized
2023-10-13 18:16:29.335 [727M] INFO: Imported 1055 queries from the on-disk database (it has 1055 rows)
2023-10-13 18:16:29.335 [727M] INFO: Parsing queries in database
2023-10-13 18:16:29.366 [727M] INFO: Imported 1055 queries from the long-term database
2023-10-13 18:16:29.369 [727M] INFO:  -> Total DNS queries: 1055
2023-10-13 18:16:29.369 [727M] INFO:  -> Cached DNS queries: 110
2023-10-13 18:16:29.369 [727M] INFO:  -> Forwarded DNS queries: 924
2023-10-13 18:16:29.370 [727M] INFO:  -> Blocked DNS queries: 9
2023-10-13 18:16:29.370 [727M] INFO:  -> Unknown DNS queries: 0
2023-10-13 18:16:29.370 [727M] INFO:  -> Unique domains: 134
2023-10-13 18:16:29.371 [727M] INFO:  -> Unique clients: 3
2023-10-13 18:16:29.371 [727M] INFO:  -> Known forward destinations: 2
2023-10-13 18:16:29.411 [727M] INFO: listening on 0.0.0.0 port 53
2023-10-13 18:16:29.441 [727M] INFO: listening on :: port 53
2023-10-13 18:16:29.448 [727M] INFO: PID of FTL process: 727
2023-10-13 18:16:29.450 [727M] INFO: FTL is running as user pihole (UID 999)
2023-10-13 18:16:29.458 [727M] INFO: Using SSL/TLS certificate file /etc/pihole/tls.pem
2023-10-13 18:16:29.513 [727M] ERR: Start of webserver failed!. Web interface will not be available!
2023-10-13 18:16:29.513 [727M] ERR:        Check webroot /var/www/html and listening ports 8080,80,[::]:80,443s,[::]:443s
2023-10-13 18:16:29.519 [727M] INFO: Blocking status is enabled

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

Your log contains:

Could you do that for me?

Please also check whether /var/www/html is readable.

The port definition 8080,80,[::]:80,443s,[::]:443s already looks non-standard, did you intentionally ask Pi-hole to provide the web interface on both 80 and 8080 (HTTP)?

I'd recommend changing the port setting, something that looks like port = "80,[::]:80,443s", in pihole.toml to port = "8080,[::]:8080,443s" if you want to use port 8080 for http.

I also added a PR to include a better error indication if the webserver fails to initialize in the hope to boost self-aid:

thanks y'all for the swift replies, actually yubiusers comment on your PR helped resolving my issue.
having a look in /var/log/pihole/webserver.log :

[2023-10-13 20:46:37.955 1435] Initializing HTTP server on port 80,[::]:80,443s,[::]:443s
[2023-10-13 20:46:37.971 1435] cannot create socket (entry 2)
[2023-10-13 20:46:37.985 1435] cannot create socket (entry 4)
[2023-10-13 20:46:37.985 1435] Failed to setup server ports

which was caused because I have had ipv6.disable=1 within /boot/cmdline.txt
after removing that, the web interface went up smooth and was reachable. Oh and I removed that 8080 :wink:

thanks again y'all.

2 Likes

This is not a solution.

Why must the docker host have ipv6 enabled? This defeats the entire purpose. These guys are having a field day with us on ipv6. It needs be disabled.

It does not have to, serving both for IPv4 and IPv6 is just the default. You can freely chose to set webserver.port to anything you want, e.g. 80,443s which would only bind IPv4 ports.

1 Like