Upgrade to 5.0 failed - please contact support

Hi,

I try to upgrade to version 5, but upgrade of ftl dones't work.

Do I need an ipv6 adress to upgrade?

https://tricorder.pi-hole.net/m3gv97brlm

Thanks.

Micha

No, you do not.

I see you are running the DietPi OS with the pi-hole.net distribution of Pi-hole installed. Let's take a look at the full ouput of the updater, please. Post the full output of:

pihole -up

root@DietPi:~# pihole -up
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: update available

[i] FTL out of date, it will be updated by the installer.

[✓] Root user check

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

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

[✓] 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

[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 dnsutils
[✓] 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.3-common
[✓] Checking for php7.3-cgi
[✓] Checking for php7.3-sqlite3
[✓] Checking for php7.3-xml
[✓] Checking for php-intl

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

Sadly I didn't see anything usefull.

Indeed strange since I can't see any exit between this step and the next output: pi-hole/automated install/basic-install.sh at 4d25f695267590b61a4061f9bb43448005d99b85 · pi-hole/pi-hole · GitHub

  • create_pihole_user should create another output line, regardless of Lighttpd service status.

Just to check the outcome of Lighttpd service handling, could you paste the output of:

systemctl enable lighttpd
systemctl status lighttpd

root@DietPi:~# systemctl enable lighttpd
Synchronizing state of lighttpd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable lighttpd
update-rc.d: error: no runlevel symlinks to modify, aborting!
root@DietPi:~# systemctl status lighttpd
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-05-11 20:25:57 CEST; 1h 3min ago
Main PID: 446 (lighttpd)
Tasks: 6 (limit: 2319)
Memory: 97.6M
CGroup: /system.slice/lighttpd.service
├─446 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
├─454 /usr/bin/php-cgi
├─529 /usr/bin/php-cgi
├─530 /usr/bin/php-cgi
├─531 /usr/bin/php-cgi
└─532 /usr/bin/php-cgi

Mai 11 21:21:18 DietPi sudo[22173]: www-data : TTY=unknown ; PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole status web
Mai 11 21:21:18 DietPi sudo[22173]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mai 11 21:21:18 DietPi sudo[22173]: pam_unix(sudo:session): session closed for user root
Mai 11 21:28:53 DietPi systemd[1]: /lib/systemd/system/lighttpd.service:6: PIDFile= references path below legacy directory /var/run/, updating /var/run/lighttpd.pid → /ru
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

FTL v4.3.1 is up and running. Stop ftl and run update dindn't work too.

Strange, everything as it should be. So the installer script somehow exits with exit code somewhere between the code lines I printed above, even that there is no explicit exit call regardless of any results.

Another check: id -u pihole

Last resort is to run the whole update as debug flag:

bash -x $(which pihole) -up

@jfb
Just a note, even that it is a DietPi system, Pi-hole has been installed the regular way, not via dietpi-software. However, I'll help to debug of course.

Thus my note.

[quote="MichaIng, post:6, topic:32033"]
bash -x $(which pihole) -up

> 
> root@DietPi:~# id -u pihole
> 999
> root@DietPi:~# bash -x $(which pihole) -up
> + readonly PI_HOLE_SCRIPT_DIR=/opt/pihole
> + PI_HOLE_SCRIPT_DIR=/opt/pihole
> + readonly gravitylist=/etc/pihole/gravity.list
> + gravitylist=/etc/pihole/gravity.list
> + readonly blacklist=/etc/pihole/black.list
> + blacklist=/etc/pihole/black.list
> + setupVars=/etc/pihole/setupVars.conf
> + PI_HOLE_BIN_DIR=/usr/local/bin
> + readonly colfile=/opt/pihole/COL_TABLE
> + colfile=/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'
> + resolver=pihole-FTL
> + [[ 1 = 0 ]]
> + case "${1}" in
> + [[ ! 0 -eq 0 ]]
> + case "${1}" in
> + updatePiholeFunc -up
> + shift
> + /opt/pihole/update.sh
>   [i] Checking for updates...
>   [i] Pi-hole Core:     up to date
>   [i] Web Interface:    up to date
>   [i] FTL:              update available
> 
>   [i] FTL out of date, it will be updated by the installer.
> 
>   [✓] Root user check
> 
>         .;;,.
>         .ccccc:,.
>          :cccclll:.      ..,,
>           :ccccclll.   ;ooodc
>            'ccll:;ll .oooodc
>              .;cll.;;looo:.
>                  .. ','.
>                 .',,,,,,'.
>               .',,,,,,,,,,.
>             .',,,,,,,,,,,,....
>           ....''',,,,,,,'.......
>         .........  ....  .........
>         ..........      ..........
>         ..........      ..........
>         .........  ....  .........
>           ........,,,,,,,'......
>             ....',,,,,,,,,,,,.
>                .',,,,,,,,,'.
>                 .',,,,,,'.
>                   ..'''.
> 
>   [i] Existing PHP installation detected : PHP version 7.3.14-1~deb10u1
>   [i] Performing unattended setup, no whiptail dialogs will be displayed
>   [✓] Disk space check
>   [✓] Update local cache of available packages
> 
>   [✓] 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
> 
>   [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 dnsutils
>   [✓] 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.3-common
>   [✓] Checking for php7.3-cgi
>   [✓] Checking for php7.3-sqlite3
>   [✓] Checking for php7.3-xml
>   [✓] Checking for php-intl
> 
>   [i] Enabling lighttpd service to start on reboot...
>   Unable to complete update, please contact Pi-hole Support
> + exit 0

seems the subshell doesn't print some output. to test I have added a set -x in /opt/pihole/update.sh
but without usefull output.

Ah that's true. So seems that -x also does not apply for sourced subscripts. Can you try to add set -x to /etc/.pihole/automated install/basic-install.sh, the final script which is sourced from /opt/pihole/update.sh and the one which exits. Even that the output does not look useful, when having the last called shell command, we at least know exactly where it stopped.

> + printf '%b  %b Checking for %s\n' '\r' '[✓]' dns-root-data
>   [✓] Checking for dns-root-data
> + for i in "$@"
> + printf '  %b Checking for %s...' '[i]' libcap2
>   [i] Checking for libcap2...+ dpkg-query -W '-f=${Status}' libcap2
> + grep 'ok installed'
> + printf '%b  %b Checking for %s\n' '\r' '[✓]' libcap2
>   [✓] Checking for libcap2
> + for i in "$@"
> + printf '  %b Checking for %s...' '[i]' lighttpd
>   [i] Checking for lighttpd...+ dpkg-query -W '-f=${Status}' lighttpd
> + grep 'ok installed'
> + printf '%b  %b Checking for %s\n' '\r' '[✓]' lighttpd
>   [✓] Checking for lighttpd
> + for i in "$@"
> + printf '  %b Checking for %s...' '[i]' php7.3-common
>   [i] Checking for php7.3-common...+ dpkg-query -W '-f=${Status}' php7.3-common
> + grep 'ok installed'
> + printf '%b  %b Checking for %s\n' '\r' '[✓]' php7.3-common
>   [✓] Checking for php7.3-common
> + for i in "$@"
> + printf '  %b Checking for %s...' '[i]' php7.3-cgi
>   [i] Checking for php7.3-cgi...+ dpkg-query -W '-f=${Status}' php7.3-cgi
> + grep 'ok installed'
> + printf '%b  %b Checking for %s\n' '\r' '[✓]' php7.3-cgi
>   [✓] Checking for php7.3-cgi
> + for i in "$@"
> + printf '  %b Checking for %s...' '[i]' php7.3-sqlite3
>   [i] Checking for php7.3-sqlite3...+ dpkg-query -W '-f=${Status}' php7.3-sqlite3
> + grep 'ok installed'
> + printf '%b  %b Checking for %s\n' '\r' '[✓]' php7.3-sqlite3
>   [✓] Checking for php7.3-sqlite3
> + for i in "$@"
> + printf '  %b Checking for %s...' '[i]' php7.3-xml
>   [i] Checking for php7.3-xml...+ dpkg-query -W '-f=${Status}' php7.3-xml
> + grep 'ok installed'
> + printf '%b  %b Checking for %s\n' '\r' '[✓]' php7.3-xml
>   [✓] Checking for php7.3-xml
> + for i in "$@"
> + printf '  %b Checking for %s...' '[i]' php-intl
>   [i] Checking for php-intl...+ dpkg-query -W '-f=${Status}' php-intl
> + grep 'ok installed'
> + printf '%b  %b Checking for %s\n' '\r' '[✓]' php-intl
>   [✓] Checking for php-intl
> + [[ 0 -gt 0 ]]
> + printf '\n'
> 
> + return 0
> + unset dep_install_list
> + [[ true == true ]]
> + enable_service lighttpd
> + local 'str=Enabling lighttpd service to start on reboot'
> + printf '  %b %s...' '[i]' 'Enabling lighttpd service to start on reboot'
>   [i] Enabling lighttpd service to start on reboot...+ is_command systemctl
> + local check_command=systemctl
> + command -v systemctl
> + systemctl enable lighttpd
> + echo -e '\n  Unable to complete update, please contact Pi-hole Support'
> 
>   Unable to complete update, please contact Pi-hole Support
> + exit 1
> + exit 0

I have add an set -x, but I don't see anything usefull.

Ah, I'm dumb, forgot that Pi-hole installer has set -e.

systemd tries to sync service state with the sysvinit service that is included in the package via update-rc.d. This "fails" with the "error" that nothing needs to be modified. Exit code indeed seems to be non-zero, making the updater/installer to exit.

I just tried to replicate this error bug was not able to. Regardless how I manually set sysvinit service state, it just says:

Synchronizing state of lighttpd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable lighttpd

And exits successfully.

Since systemd is used, please try to simply remove the sysvinit service:

rm /etc/init.d/lighttpd
update-rc.d -f lighttpd remove
systemctl enable lighttpd

The last command should now not print an error anymore, hence the updater should succeed.


If one actually wants the sysvinit service, little research showed that update-rc.d lighttpd defaults should resolve the issue as well, whyever "enable" can not just create the symlinks according to the definitions in service file :thinking:.

[✓] Storing downloaded domains in new gravity database
  [✓] Building tree
  [✓] Swapping databases
  [i] Number of gravity domains: 3074694 (2889616 unique domains)
  [i] Number of exact blacklisted domains: 41
  [i] Number of regex blacklist filters: 0
  [i] Number of exact whitelisted domains: 77
  [i] Number of regex whitelist filters: 0
  [✓] Flushing DNS cache
  [✓] Cleaning up stray matter

  [✓] DNS service is running
  [✓] Pi-hole blocking is Enabled

  [i] The install log is located at: /etc/pihole/install.log
Update Complete! 

  Current Pi-hole version is v5.0.
  Current AdminLTE version is v5.0.
  Current FTL version is v5.0.

hey, thanks a lot. it worked.

Great.

I am still trying to replicate the error by playing around with service run levels and the symlinks. No success so far :smile:. However good to keep in mind and probably a reason for Pi-hole installer to allow this command to failing, or at least exiting with meaningful error message.

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