Docker image hanging on Assigning random password

I'm running the latest pihole/pihole image. It was working but now it does not. I tried blowing away and recreating my volumes

ubuntu@pi:~/srcubuntu@pi:~/src/pihole$ docker-compose up -V
Recreating pihole ... done
Attaching to pihole
pihole    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
pihole    | [s6-init] ensuring user provided files have correct perms...exited 0.
pihole    | [fix-attrs.d] applying ownership & permissions fixes...
pihole    | [fix-attrs.d] 01-resolver-resolv: applying... 
pihole    | [fix-attrs.d] 01-resolver-resolv: exited 0.
pihole    | [fix-attrs.d] done.
pihole    | [cont-init.d] executing container initialization scripts...
pihole    | [cont-init.d] 20-start.sh: executing... 
pihole    |  ::: Starting doubuntu@pi:~/src/pihole$ docker-compose up -V
Recreating pihole ... done
Attaching to pihole
pihole    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
pihole    | [s6-init] ensuring user provided files have correct perms...exited 0.
pihole    | [fix-attrs.d] applying ownership & permissions fixes...
pihole    | [fix-attrs.d] 01-resolver-resolv: applying... 
pihole    | [fix-attrs.d] 01-resolver-resolv: exited 0.
pihole    | [fix-attrs.d] done.
pihole    | [cont-init.d] executing container initialization scripts...
pihole    | [cont-init.d] 20-start.sh: executing... 
pihole    |  ::: Starting docker specific checks & setup for docker pihole/pihole
pihole    | Assigning random password: XNKMlkVAcker specific checks & setup for docker pihole/pihole
pihole    | Assigning random password: XNKMlkVA/pihole$ docker-compose up -V
Recreating pihole ... done
Attaching to pihole
pihole    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
pihole    | [s6-init] ensuring user provided files have correct perms...exited 0.
pihole    | [fix-attrs.d] applying ownership & permissions fixes...
pihole    | [fix-attrs.d] 01-resolver-resolv: applying... 
pihole    | [fix-attrs.d] 01-resolver-resolv: exited 0.
pihole    | [fix-attrs.d] done.
pihole    | [cont-init.d] executing container initialization scripts...
pihole    | [cont-init.d] 20-start.sh: executing... 
pihole    |  ::: Starting docker specific checks & setup for docker pihole/pihole
pihole    | Assigning random password: XNKMlkVA

It just gets stuck there. Volume directories get created, but no files:

ubuntu@pi:~/src/pihole$ ls -lR volumes/                                                                                                                         
volumes/:                                                                                                                                                       
total 4                                                                                                                                                         
drwxr-xr-x 5 root root 4096 Aug 12 04:56 pihole                                                                                                                 
                                                                                                                                                                
volumes/pihole:                                                                                                                                                 
total 12                                                                                                                                                        
drwxr-xr-x 2 root root 4096 Aug 12 04:56 etc-dnsmasq.d                                                                                                          
drwxr-xr-x 2 root root 4096 Aug 12 04:56 etc-pihole                                                                                                             
drwxr-xr-x 2 root root 4096 Aug 12 04:56 var-log                                                                                                                
                                                                                                                                                                
volumes/pihole/etc-dnsmasq.d:                                                                                                                                   
total 0                                                                                                                                                         
                                                                                                                                                                
volumes/pihole/etc-pihole:                                                                                                                                      
total 0                                                                                                                                                         
                                                                                                                                                                
volumes/pihole/var-log:                                                                                                                                         
total 0     

Here is ps-ef inside the container:

ubuntu@pi:~/src/pihole$ docker-compose exec pihole ps -ef                                                                                                       
UID          PID    PPID  C STIME TTY          TIME CMD                                                                                                         
root           1       0  0 05:01 ?        00:00:00 s6-svscan -t0 /var/run/s6/services                                                                          
root          30       1  0 05:01 ?        00:00:00 foreground  if   /etc/s6/init/init-stage2-redirfd   foreground    if     if      s6-echo      -n      --    
root          31       1  0 05:01 ?        00:00:00 s6-supervise s6-fdholderd                                                                                   
root          38      30  0 05:01 ?        00:00:00 if  /etc/s6/init/init-stage2-redirfd  foreground   if    if     s6-echo     -n     --     [s6-init] making u
root          39      38  0 05:01 ?        00:00:00 foreground  if   if    s6-echo    -n    --    [s6-init] making user provided files available at /var/run/s6/
root          44      39  0 05:01 ?        00:00:00 if  if  -t   s6-test   -d   /var/run/s6/etc/cont-init.d    if   s6-echo   [cont-init.d] executing container 
root         213      44  0 05:01 ?        00:00:00 if  pipeline   s6-ls   -0   --   /var/run/s6/etc/cont-init.d    pipeline   s6-sort   -0   --    forstdin  -o
root         216     213  0 05:01 ?        00:00:00 forstdin -o 0 -0 -- i importas -u i i if  s6-echo  --  [cont-init.d] ${i}: executing...   foreground  /var/r
root         217     216  0 05:01 ?        00:00:00 [s6-ls] <defunct>                                                                                           
root         218     216  0 05:01 ?        00:00:00 [s6-sort] <defunct>                                                                                         
root         219     216  0 05:01 ?        00:00:00 foreground  /var/run/s6/etc/cont-init.d/20-start.sh  importas -u ? ? if  s6-echo  --  [cont-init.d] 20-start
root         221     219  0 05:01 ?        00:00:00 bash /var/run/s6/etc/cont-init.d/20-start.sh                                                                
root         223     221  2 05:01 ?        00:00:00 bash -e /start.sh                                                                                           
root         242     223  0 05:01 ?        00:00:00 apt-get update                                                                                              
_apt         245     242  0 05:01 ?        00:00:00 /usr/lib/apt/methods/http
_apt         246     242  0 05:01 ?        00:00:00 /usr/lib/apt/methods/http
_apt         248     242  0 05:01 ?        00:00:00 /usr/lib/apt/methods/gpgv
_apt         368     242  0 05:01 ?        00:00:00 /usr/lib/apt/methods/store
root         422       0  0 05:02 pts/0    00:00:00 ps -ef

my docker-compose:

version: "3"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    environment:
      TZ: 'Etc/UTC'
      # WEBPASSWORD: 'set a secure password here or it will be random'
      #ServerIP: '192.168.1.9' 
    # Volumes store your data between container upgrades
    volumes:
       - './volumes/pihole/etc-pihole/:/etc/pihole/'
       - './volumes/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
       - './volumes/pihole/var-log:/var/log'
    dns:
      - 127.0.0.1
      - 1.1.1.1
    # Recommended but not required (DHCP needs NET_ADMIN)
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    #cap_add:
    restart: unless-stopped

Can you post a copy of your compose yaml please?

Edited my post when I realized I pasted the same thing multiple time to actually paste that and all the things I said:

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    environment:
      TZ: 'Etc/UTC'
      # WEBPASSWORD: 'set a secure password here or it will be random'
      #ServerIP: '192.168.1.9' 
    # Volumes store your data between container upgrades
    volumes:
       - './volumes/pihole/etc-pihole/:/etc/pihole/'
       - './volumes/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
       - './volumes/pihole/var-log:/var/log'
    dns:
      - 127.0.0.1
      - 1.1.1.1
    # Recommended but not required (DHCP needs NET_ADMIN)
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    #cap_add:
    restart: unless-stopped

looks like it just took 42 minutes to start PHP. Why so long? Its a pi 3? 117 degrees Farenheight. no load

pihole    | 2020-08-12T05:01:47.658065259Z Assigning random password: 9hiWcO3h
pihole    | 2020-08-12T05:42:16.797982875Z   [i] Update local cache of available packages...^MESC[K  [✓] Update local cache of available packages
pihole    | 2020-08-12T05:42:20.553828215Z   [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u8

It didn't take 42 minutes to start PHP, it took 42 minutes to check the local apt cache.

pihole    |  ::: Starting doubuntu@pi:~/src/pihole$ docker-compose up -V
Recreating pihole ... done
pihole    | Assigning random password: XNKMlkVA/pihole$ docker-compose up -V
Recreating pihole ... done

Are you running docker-compose up -V mutliple times without down? Do you now have a bunch of dead and zombie containers running?

You maybe stalling on networking operations inside the container root 242 223 0 05:01 ? 00:00:00 apt-get update based on your ps output.

You can see everything that is happening live in the docker logs if you add the environment variable PH_VERBOSE=1

Yes, I probably did exactly that. Thanks.

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