Unable to update Gravity

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:

pihole -up should complete with no errors
Web UI should show more than -2 domains blocked

Actual Behaviour:

pihole -up completed, but an error occurred. Subsequent runs of pihole -up says everything is up to date, however, I can regenerate the error by running pihole -g -r. The output is:

pi@pihole:~ $ pihole -g -r
[i] Restoring from migration backup...cp: cannot stat 'migration_backup/*': No such file or directory
 [✓] Restoring from migration backup
 [i] Creating new gravity database
/opt/pihole/gravity.sh: line 81: 12640 Bus error               sqlite3 "${1}" < "${gravityDBschema}"
 [i] Migrating content of /etc/pihole/adlists.list into new database

 [✗] Unable to fill table adlist in database /etc/pihole/gravity.db
 
 [✓] Cleaning up stray matter
 [✓] DNS service is listening
    [✓] UDP (IPv4)
    [✓] TCP (IPv4)
    [✓] UDP (IPv6)
    [✓] TCP (IPv6)

 [✓] Pi-hole blocking is enabled

It looks kind of like the database is just an empty file, not even a valid empty database.

Debug Token:

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

Attempting to add the URL from that link results in an error when I click on the Add button.

results of pihole -r:

pi@pihole:/etc/pihole $ pihole -r

  [✓] 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.3.19-1~deb10u1
  [i] Reconfigure option selected

  [✓] Checking apt-get for upgraded packages... 85 updates available
  [i] It is recommended to update your OS after installing the Pi-hole!

  [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] Using upstream DNS: Google (ECS) (8.8.8.8, 8.8.4.4)
  [i] Static IP already configured
  [i] Unable to find IPv6 ULA/GUA address, IPv6 adblocking will not be enabled
  [i] IPv4 address: 192.168.10.5/24
  [i] IPv6 address: 
  [i] Web Interface On
  [i] Web Server On
  [i] Logging On.
  [i] Privacy level 0  [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.3-common
  [✓] Checking for php7.3-cgi
  [✓] Checking for php7.3-sqlite3
  [✓] Checking for php7.3-xml
  [✓] Checking for php7.3-json
  [✓] Checking for php7.3-intl

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

  [i] FTL Checks...

  [✓] Detected ARMv6 processor (with hard-float support)
  [i] Checking for existing FTL binary...
  [i] Latest FTL Binary already installed (v5.3.4). Confirming Checksum...
  [i] Checksum correct. No need to download!
  [✓] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf

  [i] Installing blocking page...
  [✓] Creating directory for blocking page, and copying files
  [i] Backing up index.lighttpd.html
      No default index.lighttpd.html file found... not backing up

  [✓] 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...
  [✓] 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_temp.db
  

  [✗] Unable to update gravity timestamp in database /etc/pihole/gravity.db
  
  [i] Number of gravity domains:  ( unique domains)
Error: near ")": syntax error
  [i] Number of exact blacklisted domains: 
  [i] Number of regex blacklist filters: 
  [i] Number of exact whitelisted domains: 
  [i] Number of regex whitelist filters: 
  [✓] Flushing DNS cache
  [✓] Cleaning up stray matter

  [✓] DNS service is listening
     [✓] UDP (IPv4)
     [✓] TCP (IPv4)
     [✓] UDP (IPv6)
     [✓] TCP (IPv6)

  [✓] Pi-hole blocking is enabled
  [i] View the web interface at http://pi.hole/admin or http://192.168.10.5/admin

  [i] You may now configure your devices to use the Pi-hole as their DNS server
  [i] Pi-hole DNS (IPv4): 192.168.10.5
  [i] If you set a new IP address, please restart the server running the Pi-hole

  [i] The install log is located at: /etc/pihole/install.log
Installation Complete! 
pi@pihole:/etc/pihole $

Note towards the end of the output there were a few errors regarding block lists and gravity.

Here's the top of my web GUI page:


Blocked domains is currently at -2 (weird number) and I'm not sure what it was before I tried to update.

I uninstalled pihole pihole uninstall and tried to rerun the installation script curl -sSL https://install.pi-hole.net | bash. I found I needed to update resolv.conf to add in 8.8.8.8 as a nameserver to resolve the name, and was then able to install pihole.

I still get this error:
/opt/pihole/gravity.sh: line 81: 12737 Bus error sqlite3 "${1}" < "${gravityDBschema}"

and still have -2 domains blocked.

I expected this to be the nuclear option, but I guess it wasn't. I flashed Raspian and started from scratch.

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