Pihole - up failed, lighttpd no longer starts

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

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Ubuntu 20.04 on Raspberry PI 3B

Actual Behaviour:

Tried to update Pihole but update failed. Ran pihole -d to get token. It appears lighttpd service can't be started anymore. Webinterface was working fine before running pihole - up but not anymore (did reboot Pi once).

Debug Token:

jdi9b1m5w2

Output from sudo systemctl status --full --no-pager lighttpd please.

lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-08-12 06:01:00 UTC; 23h ago
Process: 4323 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)

Aug 12 06:01:00 pihole systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Aug 12 06:01:00 pihole systemd[1]: Stopped Lighttpd Daemon.
Aug 12 06:01:00 pihole systemd[1]: lighttpd.service: Start request repeated too quickly.
Aug 12 06:01:00 pihole systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Aug 12 06:01:00 pihole systemd[1]: Failed to start Lighttpd Daemon.

sudo /usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf next.

2020-08-13 05:42:28: (configfile.c.1316) source: /etc/lighttpd/conf-enabled/15-fastcgi-php.conf line: 6 pos: 24 parser failed somehow near here: (
2020-08-13 05:42:28: (configfile.c.1316) source: find /etc/lighttpd/conf-enabled -name '*.conf' -a ! -name 'letsencrypt.conf' -printf 'include "%p"\n' 2>/dev/null line: 3 pos: 8 parser failed somehow near here: (EOL)
2020-08-13 05:42:28: (configfile.c.1316) source: /etc/lighttpd/lighttpd.conf line: 92 pos: 1 parser failed somehow near here: (EOL)

There's something not right with that file. It's not a file we have control over so you'll need to find a solution to.

On my install that file is as follows:

cat 15-fastcgi-php.conf

# -*- depends: fastcgi -*-
# /usr/share/doc/lighttpd/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi

## Start an FastCGI server for php (needs the php5-cgi package)
fastcgi.server += ( ".php" =>
        ((
                "bin-path" => "/usr/bin/php-cgi",
                "socket" => "/var/run/lighttpd/php.socket",
                "max-procs" => 1,
                "bin-environment" => (
                        "PHP_FCGI_CHILDREN" => "4",
                        "PHP_FCGI_MAX_REQUESTS" => "10000"
                ),
                "bin-copy-environment" => (
                        "PATH", "SHELL", "USER"
                ),
                "broken-scriptfilename" => "enable"
        ))
)

Hi Dan, I replaced the contents of that conf file with what's in yours and lighttpd starts again. Strange that the file got changed, I can't remember seeing a lighttpd update while I ran apt update recently. Pihole webinterface is accessible again but when I run pihole - up it still fails. Fortunately, lighttpd is still running. I've ran pihole -d again and the token is d1by0252dm

What does pihole -v show for the versions and what is the failure message of pihole -up?

Pi-hole version is v5.1.2 (Latest: v5.1.2)
AdminLTE version is v5.1.1 (Latest: v5.1.1)
FTL version is v5.1 (Latest: v5.2)

Basically the same for pihole -up as before:

[i] Enabling lighttpd service to start on reboot...
Unable to complete update, please contact Pi-hole Support

Output from:

sudo bash -x /opt/pihole/update.sh --check-only

Just need the last parts before it stops.

+ [[ ! master == \m\a\s\t\e\r ]]
+ [[ -n /usr/bin/pihole-FTL ]]
+ local FTLversion
++ /usr/bin/pihole-FTL tag
+ FTLversion=v5.1
+ local FTLlatesttag
++ curl -sI https://github.com/pi-hole/FTL/releases/latest
++ grep --color=never -i Location
++ awk -F / '{print $NF}'
++ tr -d '[:cntrl:]'
+ FTLlatesttag=v5.2
+ [[ v5.1 != \v\5\.\2 ]]
+ return 0
+ FTL_update=true
+ echo -e '  [i] FTL:\t\tupdate available'
  [i] FTL:              update available
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ [[ ! master == \m\a\s\t\e\r ]]
+ [[ false == false ]]
+ [[ false == false ]]
+ [[ true == false ]]
+ [[ true == true ]]
+ echo ''

+ exit 0

Okay, try sudo bash -x /opt/pihole/update.sh and we'll see why it won't get the latest FTL binary.

[i] Enabling lighttpd service to start on reboot...+ echo -e '\n Unable to complete update, please contact Pi-hole Support'

Unable to complete update, please contact Pi-hole Support

Sorry, that's not nearly enough information to even hazard a guess.

Full output then:

+ readonly ADMIN_INTERFACE_GIT_URL=https://github.com/pi-hole/AdminLTE.git
+ ADMIN_INTERFACE_GIT_URL=https://github.com/pi-hole/AdminLTE.git
+ readonly ADMIN_INTERFACE_DIR=/var/www/html/admin
+ ADMIN_INTERFACE_DIR=/var/www/html/admin
+ readonly PI_HOLE_GIT_URL=https://github.com/pi-hole/pi-hole.git
+ PI_HOLE_GIT_URL=https://github.com/pi-hole/pi-hole.git
+ readonly PI_HOLE_FILES_DIR=/etc/.pihole
+ PI_HOLE_FILES_DIR=/etc/.pihole
+ PH_TEST=true
+ CHECK_ONLY=false
+ source '/etc/.pihole/automated install/basic-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:119:35::35;2620:119:53::53
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_BIN_DIR=/usr/local/bin
++ PI_HOLE_BLOCKPAGE_DIR=/var/www/html/pihole
++ useUpdateVars=false
++ adlistFile=/etc/pihole/adlists.list
++ IPV4_ADDRESS=
++ IPV6_ADDRESS=
++ QUERY_LOGGING=true
++ INSTALL_WEB_INTERFACE=true
++ PRIVACY_LEVEL=0
++ '[' -z root ']'
++ '[' -t 0 ']'
+++ stty size
++ 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 ]]
++++ tput colors
+++ [[ 256 -ge 8 ]]
+++ 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'
++ counter=0
++ [[ true != true ]]
+ source /opt/pihole/COL_TABLE
++ [[ -t 1 ]]
+++ tput colors
++ [[ 256 -ge 8 ]]
++ 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'
+ [[ '' == \-\-\c\h\e\c\k\-\o\n\l\y ]]
+ main
+ local 'basicError=\n  Unable to complete update, please contact Pi-hole Support'
+ local core_update
+ local web_update
+ local FTL_update
+ core_update=false
+ web_update=false
+ FTL_update=false
+ source /etc/pihole/setupVars.conf
++ WEBPASSWORD=44fc8f2226cad730c70776254415462f4345a3721ca2a44485b70a4fa4d8b676
++ DNSMASQ_LISTENING=single
++ DNS_FQDN_REQUIRED=true
++ DNS_BOGUS_PRIV=true
++ DNSSEC=true
++ BLOCKING_ENABLED=true
++ PIHOLE_INTERFACE=eth0
++ IPV4_ADDRESS=192.168.0.5/24
++ IPV6_ADDRESS=
++ PIHOLE_DNS_1=9.9.9.9
++ PIHOLE_DNS_2=149.112.112.112
++ QUERY_LOGGING=true
++ INSTALL_WEB_SERVER=true
++ INSTALL_WEB_INTERFACE=true
++ LIGHTTPD_ENABLED=true
++ REV_SERVER=true
++ REV_SERVER_DOMAIN=home
++ REV_SERVER_TARGET=192.168.0.1
++ REV_SERVER_CIDR=192.168.0.0/24
+ is_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local rc
+ [[ -d /etc/.pihole ]]
+ pushd /etc/.pihole
+ git status --short
+ popd
+ return 0
+ echo -e '  [i] Checking for updates...'
  [i] Checking for updates...
+ GitCheckUpdateAvail /etc/.pihole
+ local directory
+ directory=/etc/.pihole
+ curdir=/home/jluijt
+ cd /etc/.pihole
+ git fetch --quiet origin
++ git rev-parse '@{0}'
+ LOCAL=6b536b7428a1f57ff34ddc444ded6d3a62b00a38
++ git rev-parse '@{upstream}'
+ REMOTE=6b536b7428a1f57ff34ddc444ded6d3a62b00a38
+ [[ 40 == 0 ]]
+ [[ 40 == 0 ]]
+ cd /home/jluijt
+ [[ 6b536b7428a1f57ff34ddc444ded6d3a62b00a38 != \6\b\5\3\6\b\7\4\2\8\a\1\f\5\7\f\f\3\4\d\d\c\4\4\4\d\e\d\6\d\3\a\6\2\b\0\0\a\3\8 ]]
+ return 1
+ core_update=false
+ echo -e '  [i] Pi-hole Core:\tup to date'
  [i] Pi-hole Core:	up to date
+ [[ true == true ]]
+ is_repo /var/www/html/admin
+ local directory=/var/www/html/admin
+ local rc
+ [[ -d /var/www/html/admin ]]
+ pushd /var/www/html/admin
+ git status --short
+ popd
+ return 0
+ GitCheckUpdateAvail /var/www/html/admin
+ local directory
+ directory=/var/www/html/admin
+ curdir=/home/jluijt
+ cd /var/www/html/admin
+ git fetch --quiet origin
++ git rev-parse '@{0}'
+ LOCAL=a03d1bddf74f0164f637126b06705bb659dfa4e7
++ git rev-parse '@{upstream}'
+ REMOTE=a03d1bddf74f0164f637126b06705bb659dfa4e7
+ [[ 40 == 0 ]]
+ [[ 40 == 0 ]]
+ cd /home/jluijt
+ [[ a03d1bddf74f0164f637126b06705bb659dfa4e7 != \a\0\3\d\1\b\d\d\f\7\4\f\0\1\6\4\f\6\3\7\1\2\6\b\0\6\7\0\5\b\b\6\5\9\d\f\a\4\e\7 ]]
+ return 1
+ web_update=false
+ echo -e '  [i] Web Interface:\tup to date'
  [i] Web Interface:	up to date
+ local funcOutput
++ get_binary_name
++ local machine
+++ uname -m
++ machine=aarch64
++ local l_binary
++ local 'str=Detecting architecture'
++ printf '  %b %s...' '[i]' 'Detecting architecture'
++ [[ aarch64 == \a\r\m* ]]
++ [[ aarch64 == *\a\a\r\c\h* ]]
++ local rev
+++ uname -m
+++ sed 's/[^0-9]//g;'
++ rev=64
++ local lib
+++ ldd /bin/ls
+++ grep -E '^\s*/lib'
+++ awk '{ print $1 }'
++ lib=/lib/ld-linux-aarch64.so.1
++ [[ /lib/ld-linux-aarch64.so.1 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\a\r\c\h\6\4\.\s\o\.\1 ]]
++ printf '%b  %b Detected ARM-aarch64 architecture\n' '\r' '[✓]'
++ l_binary=pihole-FTL-aarch64-linux-gnu
++ echo pihole-FTL-aarch64-linux-gnu
  [✓] Detected ARM-aarch64 architecture
pihole-FTL-aarch64-linux-gnu'
+ local binary
+ binary=pihole-FTL-aarch64-linux-gnu
+ FTLcheckUpdate pihole-FTL-aarch64-linux-gnu
+ printf '  %b Checking for existing FTL binary...\n' '[i]'
+ local ftlLoc
++ which pihole-FTL
+ ftlLoc=/usr/bin/pihole-FTL
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ local binary
+ binary=pihole-FTL-aarch64-linux-gnu
+ local remoteSha1
+ local localSha1
+ which dnsmasq
+ [[ ! master == \m\a\s\t\e\r ]]
+ [[ -n /usr/bin/pihole-FTL ]]
+ local FTLversion
++ /usr/bin/pihole-FTL tag
+ FTLversion=v5.1
+ local FTLlatesttag
++ curl -sI https://github.com/pi-hole/FTL/releases/latest
++ grep --color=never -i Location
++ awk -F / '{print $NF}'
++ tr -d '[:cntrl:]'
+ FTLlatesttag=v5.2
+ [[ v5.1 != \v\5\.\2 ]]
+ return 0
+ FTL_update=true
+ echo -e '  [i] FTL:\t\tupdate available'
  [i] FTL:		update available
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ [[ ! master == \m\a\s\t\e\r ]]
+ [[ false == false ]]
+ [[ false == false ]]
+ [[ true == false ]]
+ [[ false == true ]]
+ [[ false == true ]]
+ [[ false == true ]]
+ [[ true == true ]]
+ echo ''

+ echo -e '  [i] FTL out of date, it will be updated by the installer.'
  [i] FTL out of date, it will be updated by the installer.
+ [[ true == true ]]
+ '/etc/.pihole/automated install/basic-install.sh' --reconfigure --unattended

  [✓] Root user check

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

  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 7.4.3
  [i] Performing unattended setup, no whiptail dialogs will be displayed
  [✓] Disk space check

  [✓] Checking apt-get for upgraded packages... up to date!

  [i] Installer Dependency checks...
  [✓] Checking for dhcpcd5
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for whiptail
  [✓] Checking for dnsutils

  [✓] Supported OS detected
  [i] SELinux not detected
  [i] Performing reconfiguration, skipping download of local repos
  [✓] Resetting repository within /etc/.pihole...
  [✓] Resetting repository within /var/www/html/admin...
  [i] Main Dependency checks...
  [✓] Checking for cron
  [✓] Checking for curl
  [✓] Checking for iputils-ping
  [✓] Checking for lsof
  [✓] Checking for netcat
  [✓] Checking for psmisc
  [✓] Checking for sudo
  [✓] Checking for unzip
  [✓] Checking for wget
  [✓] Checking for idn2
  [✓] Checking for sqlite3
  [✓] Checking for libcap2-bin
  [✓] Checking for dns-root-data
  [✓] Checking for libcap2
  [✓] Checking for lighttpd
  [✓] Checking for php7.4-common
  [✓] Checking for php7.4-cgi
  [✓] Checking for php7.4-sqlite3
  [✓] Checking for php7.4-xml
  [✓] Checking for php7.4-intl

  [i] Enabling lighttpd service to start on reboot...+ echo -e '\n  Unable to complete update, please contact Pi-hole Support'

  Unable to complete update, please contact Pi-hole Support
+ exit 1

Does is_command systemctl work okay?

And sudo systemctl enable lighttpd?

is_command isn't found and lighttpd.service doesn't exist, however according to systemctl it is running. I'm confused.

is_command missing isn't an issue. It's a function to call either which or command -v, so command -v systemctl should work.

lighttpd.service missing is a bit of an issue.

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