Repository: pi-hole/pi-hole

Issue #4591: Installing without default blocklist causes gravity tree error, interrupting installer.
Created: 2022-01-31T15:38:40Z
Versions


Pi-hole:  v5.8.1
AdminLTE:  v5.10.1
FTL:  v5.13

Platform

OS and version:  Ubuntu 20.04 LTS, Debian Bullseye
Platform:  VM running on ESXi 7.0

Expected behavior
Fresh install with no default blocklist, so that I can import my own.
Actual behavior / bug
Installing Pi-hole without the default blocklist, it is unable to build the gravity tree as there are no domains present. This bombs out the install and does not create a default admin password. Password must be manually set via pihole -a -p for first time login. Since the installer fails prematurely, the final page directing you to the URL of the web interface does not appear either.
Steps to reproduce
Walk through standard install
Deselect built-in blocklist

Duplicate issue #4605: gravity update on install crashes if no blocklist is selected
Created: 2022-02-12T11:40:11Z
Versions


Pi-hole:  v5.8.1
AdminLTE:  v5.10.1
FTL:  v5.13

Platform


OS and version:  Raspian Bullseye



Platform:  Raspberry Pi

Expected behavior
The installer shouldn't try to do a gravity update if no blocklist is preselected.
Actual behavior / bug
The installer runs gravity update and crashes since there are no entries for it.
Steps to reproduce
Steps to reproduce the behavior:

Fresh install preferred OS
Install pihole (curl -sSL https://install.pi-hole.net | bash)
Deselect the blocklist which is recommended in the installier (https://github.com/pi-hole/pi-hole/blob/master/automated%20install/basic-install.sh#L1139)
Finish the installation

Debug Token

URL:  https://tricorder.pi-hole.net/jyLD1GAG/


Screenshots
Blocklist count is negative and not zero:

Additional context
Installer output log:
pi@raspberrypi:~ $ curl -sSL https://install.pi-hole.net | bash

  [i] Root user check
  [i] Script called with non-root privileges
      The Pi-hole requires elevated privileges to install and run
      Please check the installer for any concerns regarding this requirement
      Make sure to download this script from a trusted source

  [✓] Sudo utility check

  [✓] Root user check

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

  [✓] Update local cache of available packages

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

  [i] Checking for / installing Required dependencies for OS Check...
  [✓] Checking for grep
  [✓] Checking for dnsutils

  [✓] Supported OS detected
  [i] Checking for / installing Required dependencies for this install script...
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for whiptail
  [✓] Checking for ca-certificates

  [i] SELinux not detected

  [i] Using interface: wlan0
  [i] IPv4 address: 192.168.178.24/24
  [i] Static IP already configured
  [i] Found IPv6 ULA address
  [i] IPv6 address: fd00::882a:4eb:70d5:6c13
  [i] Using upstream DNS: Google (ECS, DNSSEC) (8.8.8.8, 8.8.4.4)
  [i] Web Interface On
  [i] Web Server On
  [i] Logging On.
  [✗] Check for existing repository in /etc/.pihole
  [i] Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole...HEAD is now at 875ad04 Merge pull request #4522 from pi-hole/development
  [✓] Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole

  [✗] Check for existing repository in /var/www/html/admin
  [i] Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin...HEAD is now at cb7a866 Merge pull request #2050 from pi-hole/devel
  [✓] Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin

  [i] Checking for / installing Required dependencies for Pi-hole software...
  [✓] Checking for cron
  [✓] Checking for curl
  [✓] Checking for iputils-ping
  [✓] Checking for psmisc
  [✓] Checking for sudo
  [✓] Checking for unzip
  [i] Checking for idn2 (will be installed)
  [i] Checking for sqlite3 (will be installed)
  [✓] Checking for libcap2-bin
  [i] Checking for dns-root-data (will be installed)
  [✓] Checking for libcap2
  [i] Checking for netcat (will be installed)
  [i] Checking for lighttpd (will be installed)
  [i] Checking for php-common (will be installed)
  [i] Checking for php-cgi (will be installed)
  [i] Checking for php-sqlite3 (will be installed)
  [i] Checking for php-xml (will be installed)
  [i] Checking for php-intl (will be installed)
  [i] Checking for php-json (will be installed)
  [i] Processing apt-get install(s) for: idn2 sqlite3 dns-root-data netcat lighttpd php-common php-cgi php-sqlite3 php-xml php-intl php-json, please wait...

Selecting previously unselected package mailcap.
(Reading database ... 36593 files and directories currently installed.)
Preparing to unpack .../00-mailcap_3.69_all.deb ...
Unpacking mailcap (3.69) ...
Selecting previously unselected package mime-support.
Preparing to unpack .../01-mime-support_3.66_all.deb ...
Unpacking mime-support (3.66) ...
Selecting previously unselected package lighttpd.
Preparing to unpack .../02-lighttpd_1.4.59-1+deb11u1_arm64.deb ...
Unpacking lighttpd (1.4.59-1+deb11u1) ...
Selecting previously unselected package dns-root-data.
Preparing to unpack .../03-dns-root-data_2021011101_all.deb ...
Unpacking dns-root-data (2021011101) ...
Selecting previously unselected package idn2.
Preparing to unpack .../04-idn2_2.3.0-5_arm64.deb ...
Unpacking idn2 (2.3.0-5) ...
Selecting previously unselected package libsodium23:arm64.
Preparing to unpack .../05-libsodium23_1.0.18-1_arm64.deb ...
Unpacking libsodium23:arm64 (1.0.18-1) ...
Selecting previously unselected package libxslt1.1:arm64.
Preparing to unpack .../06-libxslt1.1_1.1.34-4_arm64.deb ...
Unpacking libxslt1.1:arm64 (1.1.34-4) ...
Selecting previously unselected package netcat-openbsd.
Preparing to unpack .../07-netcat-openbsd_1.217-3_arm64.deb ...
Unpacking netcat-openbsd (1.217-3) ...
Selecting previously unselected package netcat.
Preparing to unpack .../08-netcat_1.10-46_all.deb ...
Unpacking netcat (1.10-46) ...
Selecting previously unselected package php-common.
Preparing to unpack .../09-php-common_2%3a76_all.deb ...
Unpacking php-common (2:76) ...
Selecting previously unselected package php7.4-common.
Preparing to unpack .../10-php7.4-common_7.4.25-1+deb11u1_arm64.deb ...
Unpacking php7.4-common (7.4.25-1+deb11u1) ...
Selecting previously unselected package php7.4-json.
Preparing to unpack .../11-php7.4-json_7.4.25-1+deb11u1_arm64.deb ...
Unpacking php7.4-json (7.4.25-1+deb11u1) ...
Selecting previously unselected package php7.4-opcache.
Preparing to unpack .../12-php7.4-opcache_7.4.25-1+deb11u1_arm64.deb ...
Unpacking php7.4-opcache (7.4.25-1+deb11u1) ...
Selecting previously unselected package php7.4-readline.
Preparing to unpack .../13-php7.4-readline_7.4.25-1+deb11u1_arm64.deb ...
Unpacking php7.4-readline (7.4.25-1+deb11u1) ...
Selecting previously unselected package php7.4-cli.
Preparing to unpack .../14-php7.4-cli_7.4.25-1+deb11u1_arm64.deb ...
Unpacking php7.4-cli (7.4.25-1+deb11u1) ...
Selecting previously unselected package php7.4-cgi.
Preparing to unpack .../15-php7.4-cgi_7.4.25-1+deb11u1_arm64.deb ...
Unpacking php7.4-cgi (7.4.25-1+deb11u1) ...
Selecting previously unselected package php-cgi.
Preparing to unpack .../16-php-cgi_2%3a7.4+76_all.deb ...
Unpacking php-cgi (2:7.4+76) ...
Selecting previously unselected package php7.4-intl.
Preparing to unpack .../17-php7.4-intl_7.4.25-1+deb11u1_arm64.deb ...
Unpacking php7.4-intl (7.4.25-1+deb11u1) ...
Selecting previously unselected package php-intl.
Preparing to unpack .../18-php-intl_2%3a7.4+76_all.deb ...
Unpacking php-intl (2:7.4+76) ...
Selecting previously unselected package php-json.
Preparing to unpack .../19-php-json_2%3a7.4+76_all.deb ...
Unpacking php-json (2:7.4+76) ...
Selecting previously unselected package php7.4-sqlite3.
Preparing to unpack .../20-php7.4-sqlite3_7.4.25-1+deb11u1_arm64.deb ...
Unpacking php7.4-sqlite3 (7.4.25-1+deb11u1) ...
Selecting previously unselected package php-sqlite3.
Preparing to unpack .../21-php-sqlite3_2%3a7.4+76_all.deb ...
Unpacking php-sqlite3 (2:7.4+76) ...
Selecting previously unselected package php7.4-xml.
Preparing to unpack .../22-php7.4-xml_7.4.25-1+deb11u1_arm64.deb ...
Unpacking php7.4-xml (7.4.25-1+deb11u1) ...
Selecting previously unselected package php-xml.
Preparing to unpack .../23-php-xml_2%3a7.4+76_all.deb ...
Unpacking php-xml (2:7.4+76) ...
Selecting previously unselected package sqlite3.
Preparing to unpack .../24-sqlite3_3.34.1-3_arm64.deb ...
Unpacking sqlite3 (3.34.1-3) ...
Setting up idn2 (2.3.0-5) ...
Setting up php-common (2:76) ...
Created symlink /etc/systemd/system/timers.target.wants/phpsessionclean.timer → /lib/systemd/system/phpsessionclean.timer.
Setting up libsodium23:arm64 (1.0.18-1) ...
Setting up php7.4-common (7.4.25-1+deb11u1) ...

Creating config file /etc/php/7.4/mods-available/calendar.ini with new version

Creating config file /etc/php/7.4/mods-available/ctype.ini with new version

Creating config file /etc/php/7.4/mods-available/exif.ini with new version

Creating config file /etc/php/7.4/mods-available/fileinfo.ini with new version

Creating config file /etc/php/7.4/mods-available/ffi.ini with new version

Creating config file /etc/php/7.4/mods-available/ftp.ini with new version

Creating config file /etc/php/7.4/mods-available/gettext.ini with new version

Creating config file /etc/php/7.4/mods-available/iconv.ini with new version

Creating config file /etc/php/7.4/mods-available/pdo.ini with new version

Creating config file /etc/php/7.4/mods-available/phar.ini with new version

Creating config file /etc/php/7.4/mods-available/posix.ini with new version

Creating config file /etc/php/7.4/mods-available/shmop.ini with new version

Creating config file /etc/php/7.4/mods-available/sockets.ini with new version

Creating config file /etc/php/7.4/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/7.4/mods-available/sysvsem.ini with new version

Creating config file /etc/php/7.4/mods-available/sysvshm.ini with new version

Creating config file /etc/php/7.4/mods-available/tokenizer.ini with new version
Setting up netcat-openbsd (1.217-3) ...
update-alternatives: using /bin/nc.openbsd to provide /bin/nc (nc) in auto mode
Setting up php7.4-readline (7.4.25-1+deb11u1) ...

Creating config file /etc/php/7.4/mods-available/readline.ini with new version
Setting up netcat (1.10-46) ...
Setting up php7.4-intl (7.4.25-1+deb11u1) ...

Creating config file /etc/php/7.4/mods-available/intl.ini with new version
Setting up php-intl (2:7.4+76) ...
Setting up dns-root-data (2021011101) ...
Setting up libxslt1.1:arm64 (1.1.34-4) ...
Setting up php7.4-opcache (7.4.25-1+deb11u1) ...

Creating config file /etc/php/7.4/mods-available/opcache.ini with new version
Setting up php7.4-sqlite3 (7.4.25-1+deb11u1) ...

Creating config file /etc/php/7.4/mods-available/sqlite3.ini with new version

Creating config file /etc/php/7.4/mods-available/pdo_sqlite.ini with new version
Setting up mailcap (3.69) ...
Setting up sqlite3 (3.34.1-3) ...
Setting up php7.4-json (7.4.25-1+deb11u1) ...

Creating config file /etc/php/7.4/mods-available/json.ini with new version
Setting up php7.4-xml (7.4.25-1+deb11u1) ...

Creating config file /etc/php/7.4/mods-available/dom.ini with new version

Creating config file /etc/php/7.4/mods-available/simplexml.ini with new version

Creating config file /etc/php/7.4/mods-available/xml.ini with new version

Creating config file /etc/php/7.4/mods-available/xmlreader.ini with new version

Creating config file /etc/php/7.4/mods-available/xmlwriter.ini with new version

Creating config file /etc/php/7.4/mods-available/xsl.ini with new version
Setting up mime-support (3.66) ...
Setting up php-json (2:7.4+76) ...
Setting up php7.4-cli (7.4.25-1+deb11u1) ...
update-alternatives: using /usr/bin/php7.4 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.4 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.4 to provide /usr/bin/phar.phar (phar.phar) in auto mode

Creating config file /etc/php/7.4/cli/php.ini with new version
Setting up php-sqlite3 (2:7.4+76) ...
Setting up lighttpd (1.4.59-1+deb11u1) ...
Enabling unconfigured: ok
Run "service lighttpd force-reload" to enable changes
Created symlink /etc/systemd/system/multi-user.target.wants/lighttpd.service → /lib/systemd/system/lighttpd.service.
Setting up php-xml (2:7.4+76) ...
Setting up php7.4-cgi (7.4.25-1+deb11u1) ...
update-alternatives: using /usr/bin/php-cgi7.4 to provide /usr/bin/php-cgi (php-cgi) in auto mode
update-alternatives: using /usr/lib/cgi-bin/php7.4 to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto mode

Creating config file /etc/php/7.4/cgi/php.ini with new version
Setting up php-cgi (2:7.4+76) ...
update-alternatives: using /usr/bin/php-cgi.default to provide /usr/bin/php-cgi (php-cgi) in auto mode
update-alternatives: using /usr/lib/cgi-bin/php.default to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto mode
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u2) ...
Processing triggers for php7.4-cli (7.4.25-1+deb11u1) ...
Processing triggers for php7.4-cgi (7.4.25-1+deb11u1) ...

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

  [i] FTL Checks...

  [✓] Detected AArch64 (64 Bit ARM) processor
  [i] Checking for existing FTL binary...
  [✓] Downloading and Installing FTL
  [✓] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...
  [✓] No dnsmasq.conf found... restoring default dnsmasq.conf...
  [✓] Installed /etc/dnsmasq.d/01-pihole.conf
  [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf

  [i] Installing blocking page...
  [✓] Creating directory for blocking page, and copying files
  [✓] Backing up index.lighttpd.html

  [✓] Installing sudoer file

  [✓] Installing latest Cron script

  [✓] Installing latest logrotate script
  [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
  [✓] man pages installed and database updated
  [i] Testing if systemd-resolved is enabled
  [i] Systemd-resolved is not enabled
  [✓] Restarting lighttpd service...
  [✓] Enabling lighttpd service to start on reboot...
  [i] Restarting services...
  [✓] 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
  [✓] Deleting existing list cache
  [i] Neutrino emissions detected...
  [✗] Pulling blocklist source list into range
  [i] No source list found, or it is empty

  [i] Building tree...
  [✗] Unable to build gravity tree in /etc/pihole/gravity.db_temp
  Error: no such table: main.gravity
   [✗] Unable to create database. Please contact support.

Closing comment (2022-02-12T11:41:54Z): Seems like a duplicate of #4591