Gravity update broken after latest update

Hi,
i did an update with pihole -up and it found an update for "Pi-hole Core".
After this the updater tries to do an gravity update and fails.
Thanks
Marcus

root@raspberrypi1:~# pihole -up
[✓] Update local cache of available packages
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for dialog
[✓] Checking for ca-certificates

[i] Checking for updates...
[i] Pi-hole Core: update available
[i] Web Interface: up to date
[i] Checksum of installed binary matches remote. No need to download!
[i] FTL: up to date
[i] Warning: You are using FTL from a custom branch (development-v6) and might be missing future releases.

[i] Pi-hole core files out of date, updating local repo.
[✓] Check for existing repository in /etc/.pihole
[✓] Update repo in /etc/.pihole

[i] If you had made any changes in '/etc/.pihole/', they have been stashed using 'git stash'

[✓] Root user check

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

[i] SELinux not detected
[✓] 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
[✓] Checking for binutils

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

[i] Performing unattended setup, no dialogs will be displayed
[i] Performing reconfiguration, skipping download of local repos
[✓] Resetting repository within /etc/.pihole...
[✓] Resetting repository within /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
[✓] Checking for libcap2-bin
[✓] Checking for dns-root-data
[✓] Checking for libcap2
[✓] Checking for netcat-openbsd
[✓] Checking for procps
[✓] Checking for jq
[✓] Checking for lshw
[✓] Checking for bash-completion

[✓] Checking for user 'pihole'

[i] FTL Checks...

[✓] Detected AArch64 (64 Bit ARM) architecture
[i] Checksum of installed binary matches remote. No need to download!
[✓] Installing scripts from /etc/.pihole

[i] Installing configs from /etc/.pihole...

[✓] Installing latest Cron script

[i] Installing latest logrotate script...
[i] Existing logrotate file found. No changes made.
[✓] man pages installed and database updated
[i] Testing if systemd-resolved is enabled
[i] Systemd-resolved is not enabled
[i] Upgrading gravity database from version 18 to 19
[i] Restarting services...
[✓] Enabling pihole-FTL service to start on reboot...
[✓] Restarting pihole-FTL service...
[✓] Deleting existing list cache
[i] Neutrino emissions detected...
[i] Storing gravity database in /etc/pihole/gravity.db
[✓] Pulling blocklist source list into range
[i] No source list found, or it is empty

[✓] Preparing new gravity database
[✓] Creating new gravity databases
[i] Using libz compression

[✗] Unable to update gravity timestamp in database /etc/pihole/gravity.db_temp
pihole-FTL: Error: unknown option: -ni
Use -help for a list of options.
[✓] Building tree
pihole-FTL: Error: unknown option: -ni
Use -help for a list of options.
pihole-FTL: Error: unknown option: -ni
Use -help for a list of options.
[i] Number of gravity domains: ( unique domains)
pihole-FTL: Error: unknown option: -ni
Use -help for a list of options.
pihole-FTL: Error: unknown option: -ni
Use -help for a list of options.
[i] Number of exact denied domains:
pihole-FTL: Error: unknown option: -ni
Use -help for a list of options.
[i] Number of regex denied filters:
pihole-FTL: Error: unknown option: -ni
Use -help for a list of options.
[i] Number of exact allowed domains:
pihole-FTL: Error: unknown option: -ni
Use -help for a list of options.
[i] Number of regex allowed filters:
[✓] Swapping databases
[✓] The old database remains available
[✓] Cleaning up stray matter

[✓] Done.

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

Core
Version is v5.17.3-280-gbb095bb2 (Latest: null)
Branch is development-v6
Hash is bb095bb2 (Latest: bb095bb2)
Web
Version is v5.19-700-gda7c0efb (Latest: null)
Branch is development-v6
Hash is da7c0efb (Latest: da7c0efb)
FTL
Version is vDev-9e3ccd9 (Latest: null)
Branch is development-v6
Hash is 9e3ccd91 (Latest: 9e3ccd91)

2 Likes

Addition:
pihole stopped blocking:

Same happened to me half an hour ago. Also running development-v6
Tried pihole -g -r options. All of them in the end. Didn’t repair the error and kept complaining about the -ni option which is invalid (as seen in the logging above)

1 Like

This is the result of some recent broken auto-merge that somehow slipped testing. Bug fix is up and here:


You could help verifying the fix by running

pihole checkout core fix/gravity_ni

and reporting if this fixes the issue you are seeing.

Sorry for the inconvenience!

1 Like

Wel yes and no for this fix. All my lists of domains have gone. So only some default blocking now. I’ll try to get my old lists and regex back. Because pihole seems to work again

It is working for me again. Thanks for the quick fix.

Thanks for confirming the fix and sorry for the issue with the lost domains @Rudig. If you haven't run pihole -g too often, you may find the old database with the content still in /etc/pihole. Otherwise, I'm afraid there isn't much we could do unless you have a backup, e.g. in a Teleporter file.

Strange mine isn’t. Imported a v5 teleporter backup. But can’t get it to resolve.
Reverted back to my old v5 install.

My bad for not having a decent backup, no worries,

What is the problem exactly? Maybe you've found a separate issue with importing the v5 teleporter file.

I see a lot of arpa requests (after reboot) but no other normal request.
For instance a “dig nu.nl” request does not show up in the logging.
Reboot etc didn’t solve it
Repair did not solve it.
Server seems unreachable, also from its own commandline

Ran into this after updating today. Tried pihole -r. Switched to "fix/gravity_ni", restored my gravity lists via teleporter (thankfully ran that recently). All good in the world again. Thanks!

[edited to mention pihole -r vs same commands as OP... brain fried]

Thank you for trying and confirming the fix. It has now been merged and development-v6 is again working as usual.

Please get back on track using

pihole checkout core development-v6

to ensure you won't miss future updates.

2 Likes

My setup works again, indeed a V5 teleporter will import in a V6 install. But will result in a non functioning Pi-hole.

I removed my container with V6, created new container with V5. Imported V5 Teleporter. Migrated to latest V6 and everything is working again.
My first time that a V6 update did not function. V6 is running for the entire household here and works perfectly.
Thanks for the great work

@Rudig please send me the archive you used via private message so I can investigate what might have gone wrong (and fix it)

1 Like

To have a backup ready when needed, i do regular backups via cron.
This does the trick:
/usr/bin/pihole-FTL --teleporter

1 Like

This is actually a very good idea :bulb::+1: