Pi-hole + unbound + docker + raspberry pi fail to start

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

Expected Behaviour:

Pi-hole container fails to start

Actual Behaviour:

It restarts in a loop every couple seconds. Had to manually create the folders and files on the host because they created as directories originally??

**$** docker logs -f pihole

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] 01-resolver-resolv: applying...

[fix-attrs.d] 01-resolver-resolv: exited 0.

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] 20-start.sh: executing...

stty: 'standard input': Inappropriate ioctl for device

::: Starting docker specific checks & setup for docker pihole/pihole

[cont-init.d] 20-start.sh: exited 1.

[cont-finish.d] executing container finish scripts...

[cont-finish.d] done.

[s6-finish] syncing disks.

[s6-finish] sending all processes the TERM signal.

[s6-finish] sending all processes the KILL signal and exiting.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] 01-resolver-resolv: applying...

[fix-attrs.d] 01-resolver-resolv: exited 0.

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] 20-start.sh: executing...

stty: 'standard input': Inappropriate ioctl for device

::: Starting docker specific checks & setup for docker pihole/pihole

[cont-init.d] 20-start.sh: exited 1.

[cont-finish.d] executing container finish scripts...

[cont-finish.d] done.

[s6-finish] syncing disks.

[s6-finish] sending all processes the TERM signal.

[s6-finish] sending all processes the KILL signal and exiting.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] 01-resolver-resolv: applying...

[fix-attrs.d] 01-resolver-resolv: exited 0.

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] 20-start.sh: executing...

stty: 'standard input': Inappropriate ioctl for device

::: Starting docker specific checks & setup for docker pihole/pihole

[cont-init.d] 20-start.sh: exited 1.

[cont-finish.d] executing container finish scripts...

[cont-finish.d] done.

[s6-finish] syncing disks.

[s6-finish] sending all processes the TERM signal.

[s6-finish] sending all processes the KILL signal and exiting.

Debug Token:

Service doesn't start so I cannot run this command.

Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
Docker version 18.06.3-ce, build d7080c1

docker-compose.yml

version: '2'

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:4.3.1-4_armhf
    hostname: pi-hole
    mac_address: d0:ca:ab:cd:ef:01
    cap_add:
      - NET_ADMIN
    ports:
      - 443/tcp
      #- 53/tcp
      #- 53/udp
      # - 67/udp # Uncomment if you want to use Pi-Hole for DHCP
      - 80/tcp
      #- 22/tcp
    environment:
      ServerIP: 192.168.1.222
      WEBPASSWORD: ${WEBPASSWORD}
      DNS1: 192.168.1.202
      DNS2: 192.168.1.202
      PH_VERSION: 1
    volumes:
      - /home/pi/docker/docker-pihole-unbound/volume:/etc/pihole:rw
      - /home/pi/docker/docker-pihole-unbound/pihole/config/hosts:/etc/hosts:rw
      - /home/pi/docker/docker-pihole-unbound/pihole/config/resolv.conf:/etc/resolv.conf:rw
      - /home/pi/docker/docker-pihole-unbound/pihole/config/dnsmasq.conf:/etc/dnsmasq.d/02-network.conf:rw
      - /home/pi/docker/docker-pihole-unbound/pihole/config/pihole-FTL.conf:/etc/pihole/pihole-FTL.conf:rw
    networks:
      home:
        ipv4_address: 192.168.1.222
    restart: always
  unbound:
    container_name: unbound
    image: mvance/unbound:rpi
    hostname: syn-unbound
    mac_address: d0:ca:ab:cd:ef:02
    ports:
      - 53/tcp
      - 53/udp
    networks:
      home:
        ipv4_address: 192.168.1.202
    restart: always

networks:
  home:
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: 192.168.1.0/24
          gateway: 192.168.1.1
          ip_range: 192.168.1.0/24 # 192.168.1.5 and 192.168.1.6

unbound seems to start without issue.

add environment of PH_VERBOSE: 1 and down + up to get more meaningful logs.

edit: sorry I meant PH_VERBOSE not PH_DEBUG

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] 01-resolver-resolv: applying...

[fix-attrs.d] 01-resolver-resolv: exited 0.

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] 20-start.sh: executing...

+ bashCmd='bash -e -x'

+ bash -e -x /start.sh

+ export TAG

+ export ServerIP

+ export ServerIPv6

+ export PYTEST

+ export PHP_ENV_CONFIG

+ export PHP_ERROR_LOG

+ export HOSTNAME

+ export WEBLOGDIR

+ export DNS1

+ export DNS2

+ export INTERFACE

+ export DNSMASQ_LISTENING_BEHAVIOUR=

+ DNSMASQ_LISTENING_BEHAVIOUR=

+ export IPv6

+ export WEB_PORT

+ export adlistFile=/etc/pihole/adlists.list

+ adlistFile=/etc/pihole/adlists.list

+ . /bash_functions.sh

++ . /opt/pihole/webpage.sh

+++ setupVars=/etc/pihole/setupVars.conf

+++ dnsmasqconfig=/etc/dnsmasq.d/01-pihole.conf

+++ dhcpconfig=/etc/dnsmasq.d/02-pihole-dhcp.conf

+++ FTLconf=/etc/pihole/pihole-FTL.conf

+++ dhcpstaticconfig=/etc/dnsmasq.d/04-pihole-static-dhcp.conf

+++ coltable=/opt/pihole/COL_TABLE

+++ [[ -f /opt/pihole/COL_TABLE ]]

+++ source /opt/pihole/COL_TABLE

++++ [[ -t 1 ]]

++++ COL_BOLD=

++++ COL_ULINE=

++++ COL_NC=

++++ COL_GRAY=

++++ COL_RED=

++++ COL_GREEN=

++++ COL_YELLOW=

++++ COL_BLUE=

++++ COL_PURPLE=

++++ COL_CYAN=

++++ COL_WHITE=

++++ COL_BLACK=

++++ COL_LIGHT_BLUE=

++++ COL_LIGHT_GREEN=

++++ COL_LIGHT_CYAN=

++++ COL_LIGHT_RED=

++++ COL_URG_RED=

++++ COL_LIGHT_PURPLE=

++++ COL_BROWN=

++++ COL_LIGHT_GRAY=

++++ COL_DARK_GRAY=

++++ TICK='[✓]'

++++ CROSS='[✗]'

++++ INFO='[i]'

++++ QST='[?]'

++++ DONE=' done!'

++++ OVER='\r'

+ PH_TEST=true

+ . /root/ph_install.sh

++ set -e

+++ cat

++ DNS_SERVERS='Google (ECS);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844

OpenDNS (ECS);208.67.222.222;208.67.220.220;2620:0:ccc::2;2620:0:ccd::2

Level3;4.2.2.1;4.2.2.2;;

Comodo;8.26.56.26;8.20.247.20;;

DNS.WATCH;84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b

Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9

Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10

Quad9 (filtered + ECS);9.9.9.11;149.112.112.11;2620:fe::11;

Cloudflare;1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001'

++ installLogLoc=/etc/pihole/install.log

++ setupVars=/etc/pihole/setupVars.conf

++ lighttpdConfig=/etc/lighttpd/lighttpd.conf

++ coltable=/opt/pihole/COL_TABLE

++ webroot=/var/www/html

++ webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git

++ webInterfaceDir=/var/www/html/admin

++ piholeGitUrl=https://github.com/pi-hole/pi-hole.git

++ PI_HOLE_LOCAL_REPO=/etc/.pihole

++ PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)

++ PI_HOLE_INSTALL_DIR=/opt/pihole

++ PI_HOLE_CONFIG_DIR=/etc/pihole

++ PI_HOLE_BLOCKPAGE_DIR=/var/www/html/pihole

++ useUpdateVars=false

++ adlistFile=/etc/pihole/adlists.list

++ regexFile=/etc/pihole/regex.list

++ IPV4_ADDRESS=

++ IPV6_ADDRESS=

++ QUERY_LOGGING=true

++ INSTALL_WEB_INTERFACE=true

++ PRIVACY_LEVEL=0

++ '[' -z '' ']'

+++ id -un

++ USER=root

+++ stty size

stty: 'standard input': Inappropriate ioctl for device

+++ printf '%d %d' 24 80

++ screen_size='24 80'

++ printf -v rows %d 24

++ printf -v columns %d 80

++ r=12

++ c=40

++ r=20

++ c=70

++ skipSpaceCheck=false

++ reconfigure=false

++ runUnattended=false

++ INSTALL_WEB_SERVER=true

++ [[ -f /opt/pihole/COL_TABLE ]]

++ source /opt/pihole/COL_TABLE

+++ [[ -t 1 ]]

+++ COL_BOLD=

+++ COL_ULINE=

+++ COL_NC=

+++ COL_GRAY=

+++ COL_RED=

+++ COL_GREEN=

+++ COL_YELLOW=

+++ COL_BLUE=

+++ COL_PURPLE=

+++ COL_CYAN=

+++ COL_WHITE=

+++ COL_BLACK=

+++ COL_LIGHT_BLUE=

+++ COL_LIGHT_GREEN=

+++ COL_LIGHT_CYAN=

+++ COL_LIGHT_RED=

+++ COL_URG_RED=

+++ COL_LIGHT_PURPLE=

+++ COL_BROWN=

+++ COL_LIGHT_GRAY=

+++ COL_DARK_GRAY=

+++ TICK='[✓]'

+++ CROSS='[✗]'

+++ INFO='[i]'

+++ QST='[?]'

+++ DONE=' done!'

+++ OVER='\r'

++ binary=tbd

++ counter=0

++ [[ true != true ]]

+ echo ' ::: Starting docker specific checks & setup for docker pihole/pihole'

+ docker_checks

+ warn_msg='WARNING Misconfigured DNS in /etc/resolv.conf'

::: Starting docker specific checks & setup for docker pihole/pihole

++ grep -c nameserver /etc/resolv.conf

+ ns_count=0

[cont-init.d] 20-start.sh: exited 1.

[cont-finish.d] executing container finish scripts...

[cont-finish.d] done.

[s6-finish] syncing disks.

[s6-finish] sending all processes the TERM signal.

[s6-finish] sending all processes the KILL signal and exiting.
::: Starting docker specific checks & setup for docker pihole/pihole
++ grep -c nameserver /etc/resolv.conf
+ ns_count=0
[cont-init.d] 20-start.sh: exited 1.

That is strange it crashes on the nameserver detection section - it isn't meant to exit but just warn users that things maybe configured wrong...I'll look into that code a little closer and reply more if more comes to mind there.

Since the count of nameservers is zero perhaps that is bombing it out, you might try adding at least one to see if that helps: https://github.com/pi-hole/docker-pi-hole/blob/master/docker-compose.yml#L25-L27

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.