Cannot get pihole to run, either on Docker or normal install (Ubuntu 18.04)

Expected Behaviour:

Pihole installs or works

Actual Behaviour:

Everything is occurring on Ubuntu 18.04 Server.

I tried installing the docker image, with the command

docker run --name pihole -e ServerIP="192.168.1.246" 

and many other things, with all different combinations of variables and scripts, and none of them worked. Was unable to access 192.168.1.246/admin/

so then I tried to install it from the command line without docker, but a very strange thing occurs. It runs the beginning, and then the part where the GUI would normally show up and let me start choosing options to install just flashes purple and exits. Full output can be seen below, but nothing else happens afterwards. I can try to record a video if that would help.

PROMPT: curl -sSL https://install.pi-hole.net | sudo bash -x
+ set -e
+ installLogLoc=/etc/pihole/install.log
+ setupVars=/etc/pihole/setupVars.conf
+ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+ coltable=/opt/pihole/COL_TABLE
+ 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
+ useUpdateVars=false
+ adlistFile=/etc/pihole/adlists.list
+ regexFile=/etc/pihole/regex.list
+ IPV4_ADDRESS=
+ IPV6_ADDRESS=
+ QUERY_LOGGING=true
+ INSTALL_WEB_INTERFACE=true
+ '[' -z root ']'
++ stty size
++ echo 24 80
+ screen_size='24 80'
++ awk '{print $1}'
++ echo '24 80'
+ rows=24
++ awk '{print $2}'
++ echo '24 80'
+ columns=80
+ r=12
+ c=40
+ r=20
+ c=70
+ skipSpaceCheck=false
+ reconfigure=false
+ runUnattended=false
+ INSTALL_WEB_SERVER=true
+ [[ -f /opt/pihole/COL_TABLE ]]
+ COL_NC='\e[0m'
+ COL_LIGHT_GREEN='\e[1;32m'
+ COL_LIGHT_RED='\e[1;31m'
+ TICK='[\e[1;32m✓\e[0m]'
+ CROSS='[\e[1;31m✗\e[0m]'
+ INFO='[i]'
+ DONE='\e[1;32m done!\e[0m'
+ OVER='\r\033[K'
+ counter=0
+ [[ '' != true ]]
+ main
+ local 'str=Root user check'
+ echo ''

+ [[ 0 -eq 0 ]]
+ echo -e '  [\e[1;32m✓\e[0m] Root user check'
  [✓] Root user check
+ show_ascii_berry
+ echo -e '
        \e[1;32m.;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           '\''ccll:;ll .oooodc
             .;cll.;;looo:.
                 \e[1;31m.. '\'','\''.
                .'\'',,,,,,'\''.
              .'\'',,,,,,,,,,.
            .'\'',,,,,,,,,,,,....
          ....'\'''\'''\'',,,,,,,'\''.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'\''......
            ....'\'',,,,,,,,,,,,.
               .'\'',,,,,,,,,'\''.
                .'\'',,,,,,'\''.
                  ..'\'''\'''\''.\e[0m
'

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

+ make_temporary_log
++ mktemp /tmp/pihole_temp.XXXXXX
+ TEMPLOG=/tmp/pihole_temp.McnCLn
+ exec
+ rm /tmp/pihole_temp.McnCLn
+ distro_check
+ command -v apt-get
+ PKG_MANAGER=apt-get
+ UPDATE_PKG_CACHE='apt-get update'
+ PKG_INSTALL=(${PKG_MANAGER} --yes --no-install-recommends install)
+ PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+ apt-get install --dry-run iproute2
+ iproute_pkg=iproute2
+ command -v php
+ [[ '' != true ]]
+ apt-get install --dry-run php
+ phpVer=php
+ apt-get install --dry-run php-sqlite3
+ phpSqlite=sqlite3
+ INSTALLER_DEPS=(apt-utils dialog debconf dhcpcd5 git ${iproute_pkg} whiptail)
+ PIHOLE_DEPS=(bc cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data resolvconf)
+ PIHOLE_WEB_DEPS=(lighttpd ${phpVer}-common ${phpVer}-cgi ${phpVer}-${phpSqlite})
+ LIGHTTPD_USER=www-data
+ LIGHTTPD_GROUP=www-data
+ LIGHTTPD_CFG=lighttpd.conf.debian
+ [[ -f /etc/pihole/setupVars.conf ]]
+ [[ false == true ]]
+ verifyFreeDiskSpace
+ local 'str=Disk space check'
+ local required_free_kilobytes=51200
+ local existing_free_kilobytes
++ df -Pk
++ grep -m1 '\/$'
++ awk '{print $4}'
+ existing_free_kilobytes=221066184
+ [[ 221066184 =~ ^([0-9])+$ ]]
+ [[ 221066184 -lt 51200 ]]
+ echo -e '  [\e[1;32m✓\e[0m] Disk space check'
  [✓] Disk space check
+ update_package_cache
+ local 'str=Update local cache of available packages'
+ echo ''

+ echo -ne '  [i] Update local cache of available packages...'
  [i] Update local cache of available packages...+ eval 'apt-get update'
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Update local cache of available packages'
  [✓] Update local cache of available packages
+ notify_package_updates_available
+ local 'str=Checking apt-get for upgraded packages'
+ echo -ne '\n  [i] Checking apt-get for upgraded packages...'

  [i] Checking apt-get for upgraded packages...++ eval 'apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+++ grep -c '^Inst'
+++ apt-get -s -o Debug::NoLocking=true upgrade
+++ true
+ updatesToInstall=0
++ uname -r
+ [[ -d /lib/modules/4.15.0-34-generic ]]
+ [[ 0 -eq 0 ]]
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking apt-get for upgraded packages... up to date!'
  [✓] Checking apt-get for upgraded packages... up to date!
+ echo ''

+ install_dependent_packages 'INSTALLER_DEPS[@]'
+ counter=1
+ [[ 1 == 1 ]]
+ echo -e '  [i] Installer Dependency checks...'
  [i] Installer Dependency checks...
+ argArray1=("${!1}")
+ declare -a argArray1
+ declare -a installArray
+ command -v debconf-apt-progress
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for apt-utils...'
  [i] Checking for apt-utils...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' apt-utils
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for apt-utils'
  [✓] Checking for apt-utils
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for dialog...'
  [i] Checking for dialog...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dialog
+ echo -e '\r\033[K  [i] Checking for dialog (will be installed)'
  [i] Checking for dialog (will be installed)
+ installArray+=("${i}")
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for debconf...'
  [i] Checking for debconf...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' debconf
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for debconf'
  [✓] Checking for debconf
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for dhcpcd5...'
  [i] Checking for dhcpcd5...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dhcpcd5
+ echo -e '\r\033[K  [i] Checking for dhcpcd5 (will be installed)'
  [i] Checking for dhcpcd5 (will be installed)
+ installArray+=("${i}")
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for git...'
  [i] Checking for git...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' git
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for git'
  [✓] Checking for git
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for iproute2...'
  [i] Checking for iproute2...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' iproute2
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for iproute2'
  [✓] Checking for iproute2
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for whiptail...'
  [i] Checking for whiptail...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' whiptail
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for whiptail'
  [✓] Checking for whiptail
+ [[ 2 -gt 0 ]]
+ test_dpkg_lock
+ i=0
+ fuser /var/lib/dpkg/lock
+ return 0
+ debconf-apt-progress -- apt-get --yes --no-install-recommends install dialog dhcpcd5

The behavior is repeated no matter what method of install I use. Does anyone have any ideas?

Related threads which may be of help:

The first one seems to have fixed it. I'm still unsure as to why the docker install failed though.

That's missing quite a few things like the port forwards and the last argument to that command has to be the image: pihole/pihole

Are you wanting to try docker still or just install using the normal installer? Did you try just running the docker readme's suggested commands or shell script in it's entirety?

I can give you more one-line command examples if you're wanting to try docker more...I'm worried the half installation of the official install script may have put you into a weird state so it was probably wise to see that through to the end.

1 Like

Yes, I've tried the suggested commands. I tried running the shell script in its entirety.

The half install of the official script seems to have fixed itself once I installed the extra things and finished it, but I do want to try docker more. (fwiw I did include the image when I ran it, I forgot to copy paste)

I would like to actually copy paste what happens with docker but then I'd have to uninstall the pihole running in the system. Basically the following happened

docker run --name pihole -e ServerIP=192.168.1.246 pihole/pihole

Everything seemed to run properly, up to and including

  [✓] DNS service is running
  [✓] Pi-hole blocking is Enabled
[cont-init.d] 20-start.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting crond
Starting lighttpd
Starting pihole-FTL (no-daemon)
[services.d] done.

but I couldn't access the admin page at all. Inspecting the docker ports showed something along the lines of all of the ports being forwarded, I think.

When I ran the docker_run.sh, neither of IPv4 or IPv6 didn't find the address. After hardcoding the IPv4 value in (since I don't have an IPv6 address), it refused to map the ports because of conflicts; before I did the pihole script however there weren't any (I only tried the script install after docker failed).

If you want I can uninstall pihole from the script, run whatever you want me to to help diagnose, and bring back the results.

Is your goal to just have Pi-hole or do you want it to be dockerized? I think your golden if it's the first.

Well I wanted it to be running, as this is on a new server for the house and the previous one broke. I also did want it to be dockerized because that makes things nice and easy, and it's been easier to set everything up again as a docker image from the start than trying to refractor it. If you don't know what the issue could be off the top of your head then it's ok either way.

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