PiHole was working until today. I have no idea what happened, I think the server restarted with some update and since then, PiHole refuses to launch with the failed to bind DHCP server socket: Permission denied error message.
Appreciate all the help, thank you.
Actual Behaviour:
docker-compose logs keeps spamming "no process found" as PiHole fails to launch:
pihole | [services.d] starting services
pihole | Starting crond
pihole | Starting pihole-FTL (no-daemon) as pihole
pihole | Starting lighttpd
pihole | [services.d] done.
pihole | Stopping pihole-FTL
pihole | Starting pihole-FTL (no-daemon) as pihole
pihole | Stopping pihole-FTL
pihole | pihole-FTL: no process found
pihole | Starting pihole-FTL (no-daemon) as pihole
pihole | Stopping pihole-FTL
pihole | pihole-FTL: no process found
pihole-FTL.conf contains the following message:
[2022-03-25 10:01:04.822 11940M] Successfully accessed setupVars.conf
[2022-03-25 10:01:04.822 11940M] FATAL ERROR in dnsmasq core: failed to bind DHCP server socket: Permission denied
[2022-03-25 10:01:04.824 11940M] ########## FTL terminated after 40ms (code 1)! ##########
This can normally ignored as long as you don't restrict Pi-hole's Interface listening behaviour to eth0 (which you correctly don't, according to your debug log).
In your case, your docker-compose is also missing the FTLCONF_REPLY_ADDR4 address, which should be set to your Docker host's private range LAN IP address.
This substitutes the older ServerIP setting, and is slightly buggy in the current image if not set.
Likely not related to your issue, but assuming you are using the latter two lines to switch Pi-hole's web server to a different port, I'd like to suggest it may be easier to just set your Pi-hole container's respective environment variable instead, unless you have to rely on one of Pi-hole's legacy blocking modes (which may be removed in a future release).
To address all above issues, please set the following Recommended and Advanced Environment variables for your Pi-hole container: FTLCONF_REPLY_ADDR4 and INTERFACE WEB_PORT
And just to be curious:
Why do you mount /etc/dhcpd.conf?
I'm not sure that would even exist in a Pi-hole image.
I'm unable to set PIHOLE_INTERFACE to a custom value because it keeps being reset to the eth0 after the container is restarted. This also happens when trying to configure REPLY_ADDR4 (which is being reset to 0.0.0.0.
Neither of those exist as an environment variable for a Pi-hole container.
Please use the names as I've provided them, and consider following the links to our Docker documentation I've provided above.
I meant variables in setupVars.conf and pihole-FTL.conf files. Now I realise you have meant variables in the Docker environment, sorry. However, I have updated those to match what you have provided, yet it still refuses to launch.
I'm having seemingly the same problem, running docker pi-hole. This morning I updated (apt update && apt full-upgrade -y --auto-remove) my Pi4 (buster) which I noted updated docker (Docker version 20.10.14, build a224086), after a reboot the pi-hole status reports 'DNS service not running' on the PI-Hole diagnosis page 'FTL failed to start due to failed to bind DHCP server socket: Permission denied' - apart from the update I ran this morning I hadn't changed anything else, my pi-hole in this configuration had been running happerly for over a year. Any help would be much appricated.