Is gravity.db missing in v5.0?

Expected Behaviour:

Web interface shows stats and ad blocking works.

Actual Behaviour:

All the web interface pages work but the main page shows no statistics. I believe this may be due to gravity.db missing from the installation. I can rerun pihole -g and the gravity update runs and shows all the lists as updated and shows the number of domains that are blocked, but as I said, nothing is showing up on the main page and nothing is being blocked since gravity.db is missing.

If I attempt a reinstallation using curl -sSL https://install.pi-hole.net | sudo bash -x you will see where the installation stops:

 [i] FTL Checks...

  [✓] Detected ARM architecture'
  [✓] Detected ARM architecture'
+ printf '  %b Checking for existing FTL binary...\n' '[i]'
  [i] Checking for existing FTL binary...
+ local ftlLoc
++ which pihole-FTL
+ ftlLoc=/usr/bin/pihole-FTL
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=v5.0
+ local binary
  [✓] Detected ARM architecture'
+ local remoteSha1
+ local localSha1
+ which dnsmasq
+ [[ ! v5.0 == \m\a\s\t\e\r ]]
+ local path
  [✓] Detected ARM architecture'
  [✓] Detected ARM architecture'
  [✓] Detected ARM architecture'
++ head -n 1
+ status=
+ grep -q 404
+ return 0
+ [[ -n /usr/bin/pihole-FTL ]]
  [✓] Detected ARM architecture.sha1'
++ cut -d ' ' -f 1
curl: (3) [globbing] bad range in column 43
+ remoteSha1=
++ cut -d ' ' -f 1
+++ which pihole-FTL
++ sha1sum /usr/bin/pihole-FTL
+ localSha1=40abb43f7834fa202ca8f5dd541657469f7d6fc5
+ [[ '' != \4\0\a\b\b\4\3\f\7\8\3\4\f\a\2\0\2\c\a\8\f\5\d\d\5\4\1\6\5\7\4\6\9\f\7\d\6\f\c\5 ]]
+ printf '  %b Checksums do not match, downloading from ftl.pi-hole.net.\n' '[i]'
  [i] Checksums do not match, downloading from ftl.pi-hole.net.
+ return 0
  [✓] Detected ARM architecture'
+ local latesttag
+ local 'str=Downloading and Installing FTL'
+ printf '  %b %s...' '[i]' 'Downloading and Installing FTL'
  [i] Downloading and Installing FTL...++ mktemp -d
+ pushd /tmp/tmp.EJCx4bKcU7
+ install -T -m 0755 /etc/.pihole/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL
+ local ftlBranch
+ local url
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=v5.0
+ local binary
  [✓] Detected ARM architecture'
+ [[ v5.0 == \m\a\s\t\e\r ]]
+ url=https://ftl.pi-hole.net/v5.0
  [✓] Detected ARM architecture'
curl: (3) [globbing] bad range in column 43
+ popd
+ printf '%b  %b %s\n' '\r' '[✗]' 'Downloading and Installing FTL'
  [✗] Downloading and Installing FTL
+ printf '  %bError: URL %s/%s not found%b\n' '' https://ftl.pi-hole.net/v5.0 'pihole-FTL  [i] Detecting a  [✓] Detected ARM architecture' ''
  [✓] Detected ARM architecture not found
+ return 1
+ return 1
+ printf '  %b FTL Engine not installed\n' '[✗]'
  [✗] FTL Engine not installed
+ exit 1

Debug Token:

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

Thank you for any help you can provide.

Your debug log is showing that a gravity database does not exist. Let's try to rebuild one. Run the following command and post the output:

pihole -g -r

Thank you for helping.

pihole -g -r
  [i] Neutrino emissions detected...
  [✓] Pulling blocklist source list into range

  [i] Target: raw.githubusercontent.com (hosts)
  [✓] Status: Retrieval successful

  [i] Target: mirror1.malwaredomains.com (justdomains)
  [✓] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_tracking.txt)
  [✓] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_ad.txt)
  [✓] Status: Retrieval successful

  [✓] Consolidating blocklists
  [✓] Extracting domains from blocklists
  [i] Number of domains being pulled in by gravity: 85211
  [✓] Removing duplicate domains
  [i] Number of unique domains trapped in the Event Horizon: 82768
  [i] Number of whitelisted domains: 13
  [i] Number of blacklisted domains: 2
  [i] Number of regex filters: 0
  [✓] Parsing domains into hosts format
  [✓] Cleaning up stray matter

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

Please do the following. Run this command:

sudo service pihole-FTL restart

and upload a new debug log and post the new token.

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

So, this is definitely looking like the install process has not completed.

I notice from your bash -x output that /etc/pihole/ftlbranch contains v5.0. That should be master ideally.

At a guess, were you running the beta before hand? Or have you at some point run pihole checkout ftl v5.0? Please run the following:

pihole checkout master to see if we can get everything back on track. If you have any idea how the ftlbranch contains v5.0, would be good to know :slight_smile:

I was not running the beta but was coming from the most recent 4.x version.

I'm sure I'm the one that inadvertantly messed up that checkout command as I was troubleshooting. I entered it correctly and get this:

pihole checkout master
  Please note that changing branches severely alters your Pi-hole subsystems
  Features that work on the master branch, may not on a development branch
  This feature is NOT supported unless a Pi-hole developer explicitly asks!
  Have you read and understood this? [y/N] y

  [i] Shortcut "master" detected - checking out master branches...
  [i] Pi-hole core
  [✓] Switching to branch: 'master' from 'refs/heads/master'
  [i] Already up-to-date.
  [i] Web interface
  [✓] Switching to branch: 'master' from 'refs/heads/master'
  [i] Already up-to-date.
  [✓] Detected ARM architecture

  [i] Running installer to upgrade your installation

  [✓] Root user check

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

  [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u7
  [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
  [✓] Check for existing repository in /etc/.pihole
  [i] Update repo in /etc/.pihole...HEAD is now at 4d25f695 Merge pull request #3321 from pi-hole/release/v5.0
  [✓] Update repo in /etc/.pihole

  [✓] Check for existing repository in /var/www/html/admin
  [i] Update repo in /var/www/html/admin...HEAD is now at b86e4a31 Merge pull request #1247 from pi-hole/release/v5.0
  [✓] Update repo in /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.0-common
  [✓] Checking for php7.0-cgi
  [✓] Checking for php7.0-sqlite3
  [✓] Checking for php7.0-xml
  [✓] Checking for php-intl

  [✓] Enabling lighttpd service to start on reboot...
  [✓] Checking for user 'pihole'

  [i] FTL Checks...

  [✓] Detected ARM architecture  [i] Checking for existing FTL binary...
  [i] Latest FTL Binary already installed (v5.0). Confirming Checksum...
curl: (3) [globbing] bad range in column 68
  [i] Corruption detected...
  [i] Downloading and Installing FTL...curl: (3) [globbing] bad range in column 70
  [✗] Downloading and Installing FTL
  Error: URL https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL  [i] Detecting architectur  [✓] Detected ARM architecture not found
  [✗] FTL Engine not installed
   Error: Unable to complete update, please contact support

hmm please could you paste in (might be too long for this - if so, use pastebin or something) a complete output from the following command:

sudo bash -x /etc/.pihole/automated\ install/basic-install.sh

Choose "update" at the prompt if you see one

2 Likes
sudo bash -x /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='32 106'
+ printf -v rows %d 32
+ printf -v columns %d 106
+ r=16
+ c=53
+ 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 ]]
+ main
+ local 'str=Root user check'
+ printf '\n'

+ [[ 0 -eq 0 ]]
+ printf '  %b %s\n' '[✓]' 'Root user check'
  [✓] Root user check
+ show_ascii_berry
+ echo -e '
        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           '\''ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. '\'','\''.
                .'\'',,,,,,'\''.
              .'\'',,,,,,,,,,.
            .'\'',,,,,,,,,,,,....
          ....'\'''\'''\'',,,,,,,'\''.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'\''......
            ....'\'',,,,,,,,,,,,.
               .'\'',,,,,,,,,'\''.
                .'\'',,,,,,'\''.
                  ..'\'''\'''\''.
'

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

+ make_temporary_log
++ mktemp /tmp/pihole_temp.XXXXXX
+ TEMPLOG=/tmp/pihole_temp.tGAUEv
+ exec
+ rm /tmp/pihole_temp.tGAUEv
+ distro_check
+ is_command apt-get
+ local check_command=apt-get
+ 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_SOURCES=/etc/apt/sources.list
+ awk 'BEGIN{a=1;b=0}/bionic main/{a=0}/bionic.*universe/{b=1}END{exit a + b}' /etc/apt/sources.list
+ apt-get install --dry-run iproute2
+ iproute_pkg=iproute2
+ is_command php
+ local check_command=php
+ command -v php
++ php
+ printf '  %b Existing PHP installation detected : PHP version %s\n' '[i]' 7.0.33-0+deb9u7
  [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u7
++ php
+ printf -v phpInsMajor %d 7
++ php
+ printf -v phpInsMinor %d 0
+ '[' 7 -ge 7 ']'
+ phpInsNewer=true
+ [[ true != true ]]
+ phpVer=php7.0
+ apt-get install --dry-run php7.0-sqlite3
+ phpSqlite=sqlite3
+ INSTALLER_DEPS=(dhcpcd5 git "${iproute_pkg}" whiptail)
+ PIHOLE_DEPS=(cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data libcap2)
+ PIHOLE_WEB_DEPS=(lighttpd "${phpVer}-common" "${phpVer}-cgi" "${phpVer}-${phpSqlite}" "${phpVer}-xml" "php-intl")
+ LIGHTTPD_USER=www-data
+ LIGHTTPD_GROUP=www-data
+ LIGHTTPD_CFG=lighttpd.conf.debian
+ [[ -f /etc/pihole/setupVars.conf ]]
+ [[ false == true ]]
+ update_dialogs
+ [[ false = true ]]
+ opt1a=Update
+ opt1b='This will retain existing settings.'
+ strAdd='You will be updated to the latest version.'
+ opt2a=Reconfigure
+ opt2b='This will reset your Pi-hole and allow you to enter new settings.'
++ whiptail --title 'Existing Install Detected!' --menu '\n\nWe have detected an existing install.\n\nPlease choose from the following options: \n(You will be updated to the latest version.)' 20 70 2 Update 'This will retain existing settings.' Reconfigure 'This will reset your Pi-hole and allow you to enter new settings.'
+ UpdateCmd=Update
+ case ${UpdateCmd} in
+ printf '  %b %s option selected\n' '[i]' Update
  [i] Update option selected
+ useUpdateVars=true
+ [[ 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=92462784
+ [[ 92462784 =~ ^([0-9])+$ ]]
+ [[ 92462784 -lt 51200 ]]
+ printf '  %b %s\n' '[✓]' 'Disk space check'
  [✓] Disk space check
+ update_package_cache
+ local 'str=Update local cache of available packages'
+ printf '  %b %s...' '[i]' 'Update local cache of available packages'
  [i] Update local cache of available packages...+ eval 'apt-get update'
+ printf '%b  %b %s\n' '\r' '[✓]' 'Update local cache of available packages'
  [✓] Update local cache of available packages
+ notify_package_updates_available
+ local 'str=Checking apt-get for upgraded packages'
+ printf '\n  %b %s...' '[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'
+++ apt-get -s -o Debug::NoLocking=true upgrade
+++ grep -c '^Inst'
+++ true
+ updatesToInstall=0
++ uname -r
+ [[ -d /lib/modules/4.14.176-oxnas-tld-1 ]]
+ [[ 0 -eq 0 ]]
+ printf '%b  %b %s... up to date!\n\n' '\r' '[✓]' 'Checking apt-get for upgraded packages'
  [✓] Checking apt-get for upgraded packages... up to date!

+ install_dependent_packages dhcpcd5 git iproute2 whiptail
+ counter=1
+ [[ 1 == 1 ]]
+ printf '  %b Installer Dependency checks...\n' '[i]'
  [i] Installer Dependency checks...
+ declare -a installArray
+ is_command apt-get
+ local check_command=apt-get
+ command -v apt-get
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' dhcpcd5
  [i] Checking for dhcpcd5...+ dpkg-query -W '-f=${Status}' dhcpcd5
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' dhcpcd5
  [✓] Checking for dhcpcd5
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' git
  [i] Checking for git...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' git
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' git
  [✓] Checking for git
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' iproute2
  [i] Checking for iproute2...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' iproute2
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' iproute2
  [✓] Checking for iproute2
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' whiptail
  [i] Checking for whiptail...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' whiptail
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' whiptail
  [✓] Checking for whiptail
+ [[ 0 -gt 0 ]]
+ printf '\n'

+ return 0
+ checkSelinux
+ local DEFAULT_SELINUX
+ local CURRENT_SELINUX
+ local SELINUX_ENFORCING=0
+ [[ -f /etc/selinux/config ]]
+ echo -e '  [i] SELinux not detected'
  [i] SELinux not detected
+ [[ 0 -eq 1 ]]
+ [[ true == false ]]
+ installDefaultBlocklists
+ [[ -f /etc/pihole/adlists.list ]]
+ return
+ source /etc/pihole/setupVars.conf
++ WEBPASSWORD=redacted
++ DHCP_START=10.1.1.100
++ DHCP_END=10.1.1.149
++ DHCP_ROUTER=10.1.1.1
++ DHCP_LEASETIME=6
++ PIHOLE_DOMAIN=lan
++ DHCP_IPv6=false
++ DHCP_ACTIVE=false
++ ADMIN_EMAIL=
++ TEMPERATUREUNIT=F
++ WEBUIBOXEDLAYOUT=boxed
++ BLOCKING_ENABLED=true
++ DNSMASQ_LISTENING=single
++ DNS_FQDN_REQUIRED=true
++ DNS_BOGUS_PRIV=true
++ DNSSEC=false
++ CONDITIONAL_FORWARDING=true
++ CONDITIONAL_FORWARDING_IP=10.1.1.1
++ CONDITIONAL_FORWARDING_DOMAIN=lan
++ CONDITIONAL_FORWARDING_REVERSE=1.1.10.in-addr.arpa
++ PIHOLE_INTERFACE=eth0
++ IPV4_ADDRESS=10.1.1.197/24
++ IPV6_ADDRESS=
++ PIHOLE_DNS_1=1.1.1.1
++ PIHOLE_DNS_2=1.0.0.1
++ QUERY_LOGGING=true
++ INSTALL_WEB_SERVER=true
++ INSTALL_WEB_INTERFACE=true
++ LIGHTTPD_ENABLED=true
+ [[ -f /etc/pihole/pihole-FTL.conf ]]
++ sed -ne 's/PRIVACYLEVEL=\(.*\)/\1/p' /etc/pihole/pihole-FTL.conf
+ PRIVACY_LEVEL=0
+ PRIVACY_LEVEL=0
+ clone_or_update_repos
+ [[ false == true ]]
+ getGitFiles /etc/.pihole https://github.com/pi-hole/pi-hole.git
+ local directory=/etc/.pihole
+ local remoteRepo=https://github.com/pi-hole/pi-hole.git
+ local 'str=Check for existing repository in /etc/.pihole'
+ printf '  %b %s...' '[i]' 'Check for existing repository in /etc/.pihole'
  [i] Check for existing repository in /etc/.pihole...+ is_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local rc
+ [[ -d /etc/.pihole ]]
+ pushd /etc/.pihole
+ git status --short
+ popd
+ return 0
+ printf '%b  %b %s\n' '\r' '[✓]' 'Check for existing repository in /etc/.pihole'
  [✓] Check for existing repository in /etc/.pihole
+ update_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local curBranch
+ local 'str=Update repo in /etc/.pihole'
+ pushd /etc/.pihole
+ printf '  %b %s...' '[i]' 'Update repo in /etc/.pihole'
  [i] Update repo in /etc/.pihole...+ git stash --all --quiet
+ git clean --quiet --force -d
+ git pull --quiet
++ git rev-parse --abbrev-ref HEAD
+ curBranch=master
+ [[ master == \m\a\s\t\e\r ]]
++ git describe --abbrev=0 --tags
+ git reset --hard v5.0
HEAD is now at 4d25f695 Merge pull request #3321 from pi-hole/release/v5.0
+ printf '%b  %b %s\n' '\r' '[✓]' 'Update repo in /etc/.pihole'
  [✓] Update repo in /etc/.pihole
+ chmod -R a+rX /etc/.pihole
+ popd
+ return 0
+ echo ''

+ return 0
+ [[ true == true ]]
+ getGitFiles /var/www/html/admin https://github.com/pi-hole/AdminLTE.git
+ local directory=/var/www/html/admin
+ local remoteRepo=https://github.com/pi-hole/AdminLTE.git
+ local 'str=Check for existing repository in /var/www/html/admin'
+ printf '  %b %s...' '[i]' 'Check for existing repository in /var/www/html/admin'
  [i] Check for existing repository in /var/www/html/admin...+ 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
+ printf '%b  %b %s\n' '\r' '[✓]' 'Check for existing repository in /var/www/html/admin'
  [✓] Check for existing repository in /var/www/html/admin
+ update_repo /var/www/html/admin
+ local directory=/var/www/html/admin
+ local curBranch
+ local 'str=Update repo in /var/www/html/admin'
+ pushd /var/www/html/admin
+ printf '  %b %s...' '[i]' 'Update repo in /var/www/html/admin'
  [i] Update repo in /var/www/html/admin...+ git stash --all --quiet
+ git clean --quiet --force -d
+ git pull --quiet
++ git rev-parse --abbrev-ref HEAD
+ curBranch=master
+ [[ master == \m\a\s\t\e\r ]]
++ git describe --abbrev=0 --tags
+ git reset --hard v5.0
HEAD is now at b86e4a31 Merge pull request #1247 from pi-hole/release/v5.0
+ printf '%b  %b %s\n' '\r' '[✓]' 'Update repo in /var/www/html/admin'
  [✓] Update repo in /var/www/html/admin
+ chmod -R a+rX /var/www/html/admin
+ popd
+ return 0
+ echo ''

+ return 0
+ dep_install_list=("${PIHOLE_DEPS[@]}")
+ local dep_install_list
+ [[ true == true ]]
+ dep_install_list+=("${PIHOLE_WEB_DEPS[@]}")
+ install_dependent_packages cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data libcap2 lighttpd php7.0-common php7.0-cgi php7.0-sqlite3 php7.0-xml php-intl
+ counter=2
+ [[ 2 == 1 ]]
+ printf '  %b Main Dependency checks...\n' '[i]'
  [i] Main Dependency checks...
+ declare -a installArray
+ is_command apt-get
+ local check_command=apt-get
+ command -v apt-get
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' cron
  [i] Checking for cron...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' cron
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' cron
  [✓] Checking for cron
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' curl
  [i] Checking for curl...+ dpkg-query -W '-f=${Status}' curl
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' curl
  [✓] Checking for curl
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' dnsutils
  [i] Checking for dnsutils...+ dpkg-query -W '-f=${Status}' dnsutils
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' dnsutils
  [✓] Checking for dnsutils
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' iputils-ping
  [i] Checking for iputils-ping...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' iputils-ping
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' iputils-ping
  [✓] Checking for iputils-ping
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' lsof
  [i] Checking for lsof...+ dpkg-query -W '-f=${Status}' lsof
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' lsof
  [✓] Checking for lsof
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' netcat
  [i] Checking for netcat...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' netcat
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' netcat
  [✓] Checking for netcat
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' psmisc
  [i] Checking for psmisc...+ dpkg-query -W '-f=${Status}' psmisc
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' psmisc
  [✓] Checking for psmisc
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' sudo
  [i] Checking for sudo...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' sudo
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' sudo
  [✓] Checking for sudo
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' unzip
  [i] Checking for unzip...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' unzip
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' unzip
  [✓] Checking for unzip
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' wget
  [i] Checking for wget...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' wget
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' wget
  [✓] Checking for wget
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' idn2
  [i] Checking for idn2...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' idn2
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' idn2
  [✓] Checking for idn2
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' sqlite3
  [i] Checking for sqlite3...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' sqlite3
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' sqlite3
  [✓] Checking for sqlite3
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' libcap2-bin
  [i] Checking for libcap2-bin...+ dpkg-query -W '-f=${Status}' libcap2-bin
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' libcap2-bin
  [✓] Checking for libcap2-bin
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' dns-root-data
  [i] Checking for dns-root-data...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dns-root-data
+ 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...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' lighttpd
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' lighttpd
  [✓] Checking for lighttpd
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php7.0-common
  [i] Checking for php7.0-common...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php7.0-common
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' php7.0-common
  [✓] Checking for php7.0-common
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php7.0-cgi
  [i] Checking for php7.0-cgi...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php7.0-cgi
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' php7.0-cgi
  [✓] Checking for php7.0-cgi
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php7.0-sqlite3
  [i] Checking for php7.0-sqlite3...+ dpkg-query -W '-f=${Status}' php7.0-sqlite3
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' php7.0-sqlite3
  [✓] Checking for php7.0-sqlite3
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php7.0-xml
  [i] Checking for php7.0-xml...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php7.0-xml
+ printf '%b  %b Checking for %s\n' '\r' '[✓]' php7.0-xml
  [✓] Checking for php7.0-xml
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php-intl
  [i] Checking for php-intl...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php-intl
+ 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
+ printf '%b  %b %s...\n' '\r' '[✓]' 'Enabling lighttpd service to start on reboot'
  [✓] Enabling lighttpd service to start on reboot...
+ check_service_active lighttpd
+ is_command systemctl
+ local check_command=systemctl
+ command -v systemctl
+ systemctl is-enabled lighttpd
+ LIGHTTPD_ENABLED=true
+ create_pihole_user
+ local 'str=Checking for user '\''pihole'\'''
+ printf '  %b %s...' '[i]' 'Checking for user '\''pihole'\'''
  [i] Checking for user 'pihole'...+ id -u pihole
+ printf '%b  %b %s\n' '\r' '[✓]' 'Checking for user '\''pihole'\'''
  [✓] Checking for user 'pihole'
+ local funcOutput
++ get_binary_name
++ local machine
+++ uname -m
++ machine=armv6l
++ local l_binary
++ local 'str=Detecting architecture'
++ printf '  %b %s...' '[i]' 'Detecting architecture'
++ [[ armv6l == \a\r\m* ]]
++ local rev
+++ uname -m
+++ sed 's/[^0-9]//g;'
++ rev=6
++ local lib
+++ ldd /bin/ls
+++ grep -E '^\s*/lib'
+++ awk '{ print $1 }'
++ lib=/lib/ld-linux.so.3
++ [[ /lib/ld-linux.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\a\r\c\h\6\4\.\s\o\.\1 ]]
++ [[ /lib/ld-linux.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\r\m\h\f\.\s\o\.\3 ]]
++ [[ -f /.dockerenv ]]
++ printf '%b  %b Detected ARM architecture\n' '\r' '[✓]'
++ binary=pihole-FTL-arm-linux-gnueabi
++ echo
  [✓] Detected ARM architecture'
+ local binary
  [✓] Detected ARM architecture'
+ local theRest
  [✓] Detected ARM architecture'
  [✓] Detected ARM architecture'
+ printf '\n  %b FTL Checks...\n\n' '[i]'

  [i] FTL Checks...

  [✓] Detected ARM architecture'
  [✓] Detected ARM architecture'
+ printf '  %b Checking for existing FTL binary...\n' '[i]'
  [i] Checking for existing FTL binary...
+ local ftlLoc
++ which pihole-FTL
+ ftlLoc=/usr/bin/pihole-FTL
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ local binary
  [✓] Detected ARM architecture'
+ 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.0
+ local FTLlatesttag
++ curl -sI https://github.com/pi-hole/FTL/releases/latest
++ awk -F / '{print $NF}'
++ grep --color=never -i Location
++ tr -d '[:cntrl:]'
+ FTLlatesttag=v5.0
+ [[ v5.0 != \v\5\.\0 ]]
+ printf '  %b Latest FTL Binary already installed (%s). Confirming Checksum...\n' '[i]' v5.0
  [i] Latest FTL Binary already installed (v5.0). Confirming Checksum...
++ curl -sSL --fail 'https://github.com/pi-hole/FTL/releases/download/v5.0/pihole-FTL  [i] Detecting archi  [✓] Detected ARM architecture.sha1'
++ cut -d ' ' -f 1
curl: (3) [globbing] bad range in column 68
+ remoteSha1=
++ cut -d ' ' -f 1
+++ which pihole-FTL
++ sha1sum /usr/bin/pihole-FTL
+ localSha1=40abb43f7834fa202ca8f5dd541657469f7d6fc5
+ [[ '' != \4\0\a\b\b\4\3\f\7\8\3\4\f\a\2\0\2\c\a\8\f\5\d\d\5\4\1\6\5\7\4\6\9\f\7\d\6\f\c\5 ]]
+ printf '  %b Corruption detected...\n' '[i]'
  [i] Corruption detected...
+ return 0
  [✓] Detected ARM architecture'
+ local latesttag
+ local 'str=Downloading and Installing FTL'
+ printf '  %b %s...' '[i]' 'Downloading and Installing FTL'
  [i] Downloading and Installing FTL...++ mktemp -d
+ pushd /tmp/tmp.inLcLFg0bE
+ install -T -m 0755 /etc/.pihole/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL
+ local ftlBranch
+ local url
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ local binary
  [✓] Detected ARM architecture'
+ [[ master == \m\a\s\t\e\r ]]
+ url=https://github.com/pi-hole/ftl/releases/latest/download
+ curl -sSL --fail 'https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL  [i] Detecting arch  [✓] Detected ARM architecture'
curl: (3) [globbing] bad range in column 70
+ popd
+ printf '%b  %b %s\n' '\r' '[✗]' 'Downloading and Installing FTL'
  [✗] Downloading and Installing FTL
+ printf '  %bError: URL %s/%s not found%b\n' '' https://github.com/pi-hole/ftl/releases/latest/download '  [✓] Detected ARM architecture' ''
  Error: URL https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL  [i] Detecting architectur  [✓] Detected ARM architecture not found
+ return 1
+ return 1
+ printf '  %b FTL Engine not installed\n' '[✗]'
  [✗] FTL Engine not installed
+ exit 1

OK, there are maybe two things going on here. One is a potential bug with the code, another is that your system image might be wonky.. but we'll get to that in a minute.

Can you try the following to see if it completes the install please (or at least gets us further!!)

pihole checkout core tweak/binary_detection

Partial success! The installation was successful but at the end I get:

  [✓] Enabling pihole-FTL service to start on reboot...
  [✓] Restarting pihole-FTL service...
  [i] Creating new gravity database
  [i] Migrating content of /etc/pihole/adlists.list into new database
  [i] Migrating content of /etc/pihole/blacklist.txt into new database
  [i] Migrating content of /etc/pihole/whitelist.txt into new database
  [i] Migrating content of /etc/pihole/regex.list into new database
  [✓] Deleting existing list cache
  [✗] DNS service is not running
  [✓] Restarting DNS server
  [✗] DNS resolution is not available
   Error: Unable to complete update, please contact support

Do you need another debug log or more of the log?

OK, a step in the right direction.

Another debug log would be helpful. I'm just trying to find out if there are some more logs you can get us that would be useful, too.

As an aside, what hardware/distro are you currently running?

can you also send us the last 50 lines or so of a couple of files:

tail -n50 /var/log/pihole.log
tail -n50 /var/log/pihole-FTL.log

This is a Pogoplug Pro, which may be part of the issue? I have been running Pi-hole on them for years and know they are probably on borrowed time. They run on the following:

Linux PogoplugPro1 4.14.176-oxnas-tld-1 #2 SMP PREEMPT Sun Apr 26 15:24:37 PDT 2020 armv6l GNU/Linux

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian

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

tail -n50 /var/log/pihole.log
May 11 15:11:07 dnsmasq[15530]: 306 127.0.0.1/48692 query[AAAA] github.com from 127.0.0.1
May 11 15:11:07 dnsmasq[15530]: 306 127.0.0.1/48692 cached github.com is NODATA-IPv6
May 11 15:11:19 dnsmasq[15530]: 307 127.0.0.1/40884 query[A] github.com from 127.0.0.1
May 11 15:11:19 dnsmasq[15530]: 307 127.0.0.1/40884 forwarded github.com to 1.0.0.1
May 11 15:11:19 dnsmasq[15530]: 308 127.0.0.1/40884 query[AAAA] github.com from 127.0.0.1
May 11 15:11:19 dnsmasq[15530]: 308 127.0.0.1/40884 cached github.com is NODATA-IPv6
May 11 15:11:19 dnsmasq[15530]: 307 127.0.0.1/40884 reply github.com is 140.82.112.4
May 11 15:11:20 dnsmasq[15530]: 309 127.0.0.1/51745 query[A] github.com from 127.0.0.1
May 11 15:11:20 dnsmasq[15530]: 309 127.0.0.1/51745 cached github.com is 140.82.112.4
May 11 15:11:20 dnsmasq[15530]: 310 127.0.0.1/51745 query[AAAA] github.com from 127.0.0.1
May 11 15:11:20 dnsmasq[15530]: 310 127.0.0.1/51745 forwarded github.com to 1.0.0.1
May 11 15:11:20 dnsmasq[15530]: 310 127.0.0.1/51745 reply github.com is NODATA-IPv6
May 11 15:11:21 dnsmasq[15530]: 311 127.0.0.1/38694 query[A] github-production-release-asset-2e65be.s3.amazonaws.com from 127.0.0.1
May 11 15:11:21 dnsmasq[15530]: 311 127.0.0.1/38694 forwarded github-production-release-asset-2e65be.s3.amazonaws.com to 1.0.0.1
May 11 15:11:21 dnsmasq[15530]: 312 127.0.0.1/38694 query[AAAA] github-production-release-asset-2e65be.s3.amazonaws.com from 127.0.0.1
May 11 15:11:21 dnsmasq[15530]: 312 127.0.0.1/38694 forwarded github-production-release-asset-2e65be.s3.amazonaws.com to 1.0.0.1
May 11 15:11:21 dnsmasq[15530]: 311 127.0.0.1/38694 reply github-production-release-asset-2e65be.s3.amazonaws.com is <CNAME>
May 11 15:11:21 dnsmasq[15530]: 311 127.0.0.1/38694 reply s3-1-w.amazonaws.com is 52.216.107.68
May 11 15:11:21 dnsmasq[15530]: 312 127.0.0.1/38694 reply github-production-release-asset-2e65be.s3.amazonaws.com is <CNAME>
May 11 15:11:21 dnsmasq[15530]: 312 127.0.0.1/38694 reply s3-1-w.amazonaws.com is NODATA-IPv6
May 11 15:11:23 dnsmasq[15530]: 313 127.0.0.1/47756 query[A] github.com from 127.0.0.1
May 11 15:11:23 dnsmasq[15530]: 313 127.0.0.1/47756 cached github.com is 140.82.112.4
May 11 15:11:23 dnsmasq[15530]: 314 127.0.0.1/47756 query[AAAA] github.com from 127.0.0.1
May 11 15:11:23 dnsmasq[15530]: 314 127.0.0.1/47756 cached github.com is NODATA-IPv6
May 11 15:11:23 dnsmasq[15530]: 315 127.0.0.1/49210 query[A] github-production-release-asset-2e65be.s3.amazonaws.com from 127.0.0.1
May 11 15:11:23 dnsmasq[15530]: 315 127.0.0.1/49210 cached github-production-release-asset-2e65be.s3.amazonaws.com is <CNAME>
May 11 15:11:23 dnsmasq[15530]: 315 127.0.0.1/49210 cached s3-1-w.amazonaws.com is 52.216.107.68
May 11 15:11:23 dnsmasq[15530]: 316 127.0.0.1/49210 query[AAAA] github-production-release-asset-2e65be.s3.amazonaws.com from 127.0.0.1
May 11 15:11:23 dnsmasq[15530]: 316 127.0.0.1/49210 cached github-production-release-asset-2e65be.s3.amazonaws.com is <CNAME>
May 11 15:11:23 dnsmasq[15530]: 316 127.0.0.1/49210 cached s3-1-w.amazonaws.com is NODATA-IPv6
May 11 15:11:26 dnsmasq[15530]: 317 127.0.0.1/59760 query[A] github.com from 127.0.0.1
May 11 15:11:26 dnsmasq[15530]: 317 127.0.0.1/59760 cached github.com is 140.82.112.4
May 11 15:11:26 dnsmasq[15530]: 318 127.0.0.1/59760 query[AAAA] github.com from 127.0.0.1
May 11 15:11:26 dnsmasq[15530]: 318 127.0.0.1/59760 cached github.com is NODATA-IPv6
May 11 15:11:27 dnsmasq[15530]: 319 127.0.0.1/35553 query[A] github-production-release-asset-2e65be.s3.amazonaws.com from 127.0.0.1
May 11 15:11:27 dnsmasq[15530]: 319 127.0.0.1/35553 cached github-production-release-asset-2e65be.s3.amazonaws.com is <CNAME>
May 11 15:11:27 dnsmasq[15530]: 319 127.0.0.1/35553 forwarded github-production-release-asset-2e65be.s3.amazonaws.com to 1.0.0.1
May 11 15:11:27 dnsmasq[15530]: 320 127.0.0.1/35553 query[AAAA] github-production-release-asset-2e65be.s3.amazonaws.com from 127.0.0.1
May 11 15:11:27 dnsmasq[15530]: 320 127.0.0.1/35553 forwarded github-production-release-asset-2e65be.s3.amazonaws.com to 1.0.0.1
May 11 15:11:27 dnsmasq[15530]: 319 127.0.0.1/35553 reply github-production-release-asset-2e65be.s3.amazonaws.com is <CNAME>
May 11 15:11:27 dnsmasq[15530]: 319 127.0.0.1/35553 reply s3-1-w.amazonaws.com is 52.216.144.171
May 11 15:11:27 dnsmasq[15530]: 320 127.0.0.1/35553 reply github-production-release-asset-2e65be.s3.amazonaws.com is <CNAME>
May 11 15:11:27 dnsmasq[15530]: 320 127.0.0.1/35553 reply s3-1-w.amazonaws.com is NODATA-IPv6
May 11 15:11:28 dnsmasq[15530]: 321 127.0.0.1/39565 query[A] ftl.pi-hole.net from 127.0.0.1
May 11 15:11:28 dnsmasq[15530]: 321 127.0.0.1/39565 forwarded ftl.pi-hole.net to 1.0.0.1
May 11 15:11:28 dnsmasq[15530]: 322 127.0.0.1/39565 query[AAAA] ftl.pi-hole.net from 127.0.0.1
May 11 15:11:28 dnsmasq[15530]: 322 127.0.0.1/39565 forwarded ftl.pi-hole.net to 1.0.0.1
May 11 15:11:28 dnsmasq[15530]: 321 127.0.0.1/39565 reply ftl.pi-hole.net is 139.59.170.52
May 11 15:11:28 dnsmasq[15530]: 322 127.0.0.1/39565 reply ftl.pi-hole.net is NODATA-IPv6
May 11 15:11:31 dnsmasq[15530]: exiting on receipt of SIGTERM
tail -n50 /var/log/pihole-FTL.log
[2020-05-11 14:09:24.155 15527]    CNAME_DEEP_INSPECT: Active
[2020-05-11 14:09:24.156 15527]    DELAY_STARTUP: No delay requested.
[2020-05-11 14:09:24.156 15527]    BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}
[2020-05-11 14:09:24.158 15527] Finished config file parsing
[2020-05-11 14:09:24.175 15527] Database version is 5
[2020-05-11 14:09:24.175 15527] Database successfully initialized
[2020-05-11 14:09:24.207 15527] New upstream server: 10.1.1.1 (0/1024)
[2020-05-11 14:09:24.208 15527] New upstream server: 127.0.0.1 (1/1024)
[2020-05-11 14:09:24.268 15527] New upstream server: 1.0.0.1 (2/1024)
[2020-05-11 14:09:24.296 15527] Imported 756 queries from the long-term database
[2020-05-11 14:09:24.297 15527]  -> Total DNS queries: 756
[2020-05-11 14:09:24.297 15527]  -> Cached DNS queries: 337
[2020-05-11 14:09:24.297 15527]  -> Forwarded DNS queries: 413
[2020-05-11 14:09:24.298 15527]  -> Blocked DNS queries: 0
[2020-05-11 14:09:24.298 15527]  -> Unknown DNS queries: 6
[2020-05-11 14:09:24.298 15527]  -> Unique domains: 82
[2020-05-11 14:09:24.298 15527]  -> Unique clients: 3
[2020-05-11 14:09:24.299 15527]  -> Known forward destinations: 3
[2020-05-11 14:09:24.299 15527] Successfully accessed setupVars.conf
[2020-05-11 14:09:24.333 15530] PID of FTL process: 15530
[2020-05-11 14:09:24.334 15530] Listening on port 4711 for incoming IPv4 telnet connections
[2020-05-11 14:09:24.336 15530] Listening on port 4711 for incoming IPv6 telnet connections
[2020-05-11 14:09:24.336 15530] Listening on Unix socket
[2020-05-11 14:09:24.341 15530] Reloading DNS cache
[2020-05-11 14:09:24.342 15530] Blocking status is enabled
[2020-05-11 14:09:24.343 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.344 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.344 15530] gravityDB_count(0): Gravity database not available
[2020-05-11 14:09:24.345 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.345 15530] gravityDB_count(3): Gravity database not available
[2020-05-11 14:09:24.346 15530] WARN: Database query failed, assuming there are no blacklist regex entries
[2020-05-11 14:09:24.346 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.346 15530] gravityDB_count(4): Gravity database not available
[2020-05-11 14:09:24.347 15530] WARN: Database query failed, assuming there are no whitelist regex entries
[2020-05-11 14:09:24.347 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.347 15530] get_client_groupids(): Gravity database not available
[2020-05-11 14:09:24.348 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.348 15530] get_client_groupids(): Gravity database not available
[2020-05-11 14:09:24.348 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.349 15530] get_client_groupids(): Gravity database not available
[2020-05-11 14:09:24.349 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.349 15530] get_client_groupids(): Gravity database not available
[2020-05-11 14:09:24.350 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.350 15530] get_client_groupids(): Gravity database not available
[2020-05-11 14:09:24.350 15530] gravityDB_open(): /etc/pihole/gravity.db does not exist
[2020-05-11 14:09:24.351 15530] get_client_groupids(): Gravity database not available
[2020-05-11 14:09:24.351 15530] Compiled 0 whitelist and 0 blacklist regex filters in 6.0 msec
[2020-05-11 15:11:31.444 15530] Shutting down...
[2020-05-11 15:11:32.149 15530] Finished final database update
[2020-05-11 15:11:32.152 15530] ########## FTL terminated after 3.728004e+03 s! ##########

OK, looks like the gravity db didn't get properly created. does pihole -g -r work now?

It worked to create gravity.db but dns is still not running even after running sudo service pihole-FTL restart.

pihole -g -r
  [✓] Restoring from migration backup
  [i] Creating new gravity database
  [i] Migrating content of /etc/pihole/adlists.list into new database
  [i] Migrating content of /etc/pihole/blacklist.txt into new database
  [i] Migrating content of /etc/pihole/whitelist.txt into new database
  [i] Migrating content of /etc/pihole/regex.list into new database
  [i] Neutrino emissions detected...
  [✓] Pulling blocklist source list into range

  [✓] Preparing new gravity database
  [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  [✓] Status: Retrieval successful
  [i] Received 55200 domains

  [i] Target: https://mirror1.malwaredomains.com/files/justdomains
  [✓] Status: Retrieval successful
  [i] Received 26857 domains

  [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
  [✓] Status: Retrieval successful
  [i] Received 34 domains

  [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
  [✓] Status: Retrieval successful
  [i] Received 2701 domains

  [✓] Storing downloaded domains in new gravity database
  [✓] Building tree
  [✓] Swapping databases
  [i] Number of gravity domains: 84792 (82385 unique domains)
  [i] Number of exact blacklisted domains: 2
  [i] Number of regex blacklist filters: 2
  [i] Number of exact whitelisted domains: 13
  [i] Number of regex whitelist filters: 0
  [✗] pihole-FTL: no process found
  [✓] Cleaning up stray matter
  [✓] Restarting DNS server

  [✗] DNS service is NOT running

The issue may also be the sqlite3 version on your system, maybe gravity cannot work with it.

What is the output of

sqlite3 --version
ls -lh /etc/pihole/gravity.db
sqlite3 /etc/pihole/gravity.db "SELECT * FROM vw_gravity LIMIT 10;"

?

sqlite3 --version
3.16.2 2017-01-06 16:32:41 a65a62893ca8319e89e48b8a38cf8a59c69a8209

ls -lh /etc/pihole/gravity.db
-rw-rw-r-- 1 pihole pihole 4.9M May 11 15:59 /etc/pihole/gravity.db

sqlite3 /etc/pihole/gravity.db "SELECT * FROM vw_gravity LIMIT 10;"
localhost.localdomain|0
01mspmd5yalky8.com|0
0byv9mgbn0.com|0
analytics.247sports.com|0
www.analytics.247sports.com|0
2no.co|0
www.2no.co|0
logitechlogitechglobal.112.2o7.net|0
www.logitechlogitechglobal.112.2o7.net|0
30-day-change.com|0

The file has been created around 16:00, the errors in FTL's log are from earlier

Are they still in the log when you restart pihole-FTL?

Yes the log looks the same right now, even after restarting pihole-FTL a couple of times.