Please follow the below template, it will help us to help you!
Expected Behaviour:
[PiHole starts dns server]
Actual Behaviour:
[Error message saying : [✗] DNS resolution is currently unavailable,]
I am running a docker container diginc/pi-hole on CoreELEC. I set up my container with the following command:
docker run -d \
--name pihole \
--network host \
--cap-add NET_ADMIN \
-v "/storage/.kodi/userdata/addon_data/docker.linuxserver.pihole/pihole/:/etc/pihole/" \
-v "/storage/.kodi/userdata/addon_data/docker.linuxserver.pihole/dnsmasq.d/:/etc/dnsmasq.d/" \
-e ServerIP="192.168.1.50" \
-e WEBPASSWORD="xyz" \
-e TZ="Asia/Karachi" \
-e IPv6="False" \
--restart=unless-stopped \
diginc/pi-hole-multiarch:debian_armhf
The setup works fine until i reboot. After a reboot, if i check the log, it says:
DOCKER_REPO=multiarch/debian-debootstrap,
EUID=0,
FTL_CMD=no-daemon,,
),
HOME=/root,
HOSTNAME=CoreELEC,
HOSTTYPE=arm,
IFS=$' \t\n',
IPv6=False,
MACHTYPE=arm-unknown-linux-gnueabihf,
OPTERR=1,
OPTIND=1,
OSTYPE=linux-gnueabihf,
PATH=/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin,
PHP_ENV_CONFIG=/etc/lighttpd/conf-enabled/15-fastcgi-php.conf,
PHP_ERROR_LOG=/var/log/lighttpd/error.log,
PIHOLE_INSTALL=/tmp/ph_install.sh,
PPID=212,
PS4='+ ',
PWD=/,
S6OVERLAY_RELEASE=https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-armhf.tar.gz,
S6_KEEP_ENV=1,
SHELL=/bin/bash,
SHELLOPTS=braceexpand:hashall:interactive-comments,
SHLVL=1,
ServerIP=192.168.1.50,
TAG=debian,,
b,
TZ=Asia/Karachi,
UBUNTU_SUITE=stretch,
UID=0,
WEBPASSWORD=xyz,
_=bash,
setupVars=/etc/pihole/setupVars.conf,
::: Starting docker specific setup for docker diginc/pi-hole,
RTNETLINK answers: Network is unreachable,
ERROR: ServerIP Environment variable (192.168.1.50) doesn't appear to be a valid IPv4 address,
[✗] DNS resolution is currently unavailable,
[i] Time until retry: 120
[i] Time until retry: 120
[i] Time until retry: 119
[i] Time until retry: 118
.
.
After the 120s timeout, the server tries again, and according to the log its working, but the admin page says DNS server not active.
A simple restart of the container fixes all my problems and pihole starts functioning well. The problem happens after a host system reboot. What can i do to fix this ?