Adlist problem V5

Even with the edits marked 'solution' I'm still getting this error after updating and also on fresh installs.

Anything else we can try?

Thanks!

Please upload a debug log and post just the token generated by

pihole -d

allowing to upload when prompted, or do it through the Web interface:

Tools > Generate Debug Log

Hello! Logs from latest test update are uploaded. Token is y4d3kuccxg

Thanks!

You have modified your local code and are not running our shipped code.

*** [ DIAGNOSING ]: Core version
[i] Core: v5.2.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin	https://github.com/pi-hole/pi-hole.git (fetch)'
             'origin	https://github.com/pi-hole/pi-hole.git (push)
[i] Branch: master
[i] Commit: v5.2.1-0-g0d8ece1-dirty
[i] Status:  M gravity.sh
[i] Diff: diff --git a/gravity.sh b/gravity.sh'
          'index 9ac3851..5a831da 100755'
          '--- a/gravity.sh'
          '+++ b/gravity.sh'
          '@@ -176,7 +176,7 @@ database_table_from_file() {'
          '         echo "${rowid},\"${domain}\",${timestamp}" >> "${tmpFile}"'
          '       elif [[ "${table}" == "adlist" ]]; then'
          '         # Adlist table format'
          '-        echo "${rowid},\"${domain}\",1,${timestamp},${timestamp},\"Migrated from ${source}\"" >> "${tmpFile}"'
          '+        echo "${rowid},\"${domain}\",1,${timestamp},${timestamp},\"Migrated from ${source}\"," >> "${tmpFile}"'
          '       else'
          '         # White-, black-, and regexlist table format'
          '         echo "${rowid},${type},\"${domain}\",1,${timestamp},${timestamp},\"Migrated from ${source}\"" >> "${tmpFile}"

There are a number of other problems in the log, but we'll start with this one.

Yes, apologies. I have edited based on the github suggestion for the error. This was a working install on past version until an update was attempted. Even without that edit, the issue persists.

Thanks for your time and looking into the issue, I really appreciate it!

Just attempted with another fresh install on a local VM. No modified local code, no internal VPN, stock & up-to-date CentOS 7.

Token is ip8b9x0xxu.

Thanks!

 [2020-12-09 19:10:51.078 12143/T12147] gravityDB_open(): /etc/pihole/gravity.db does not exist
   [2020-12-09 19:10:51.079 12143/T12147] gravityDB_open(): /etc/pihole/gravity.db does not exist
   [2020-12-09 19:10:51.080 12143/T12147] gravityDB_count(0): Gravity database not available
   [2020-12-09 19:10:51.080 12143/T12147] gravityDB_open(): /etc/pihole/gravity.db does not exist

The gravity database still does not exist. Please run

pihole -g -r

and post the output.

Yes, it did not run due to expecting 7 lines in the initial list, but finding 6. This is a fresh install so there is nothing to restore. Attempting install or generating again also fails with the same errors.

(Tail end of install and attempted -g -r)

[i] Building tree...
[โœ—] Unable to build gravity tree in /etc/pihole/gravity_temp.db
Error: no such table: main.gravity
[i] Number of gravity domains: 0 (0 unique domains)
[i] Number of exact blacklisted domains: 0
[i] Number of regex blacklist filters: 0
[i] Number of exact whitelisted domains: 0
[i] Number of regex whitelist filters: 0
[โœ“] 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] You may now configure your devices to use the Pi-hole as their DNS server
[i] Pi-hole DNS (IPv4): 192.168.1.80
[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!
[root@test ~]# 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
[i] Migrating content of /etc/pihole/adlists.list into new database

[โœ—] Unable to fill table adlist in database /etc/pihole/gravity.db
Error: /tmp/tmp.XlIfMW7nHP.gravity line 1: expected 7 columns of data but found 6
[โœ“] Cleaning up stray matter
[โœ“] DNS service is listening
[โœ“] UDP (IPv4)
[โœ“] TCP (IPv4)
[โœ“] UDP (IPv6)
[โœ“] TCP (IPv6)

[โœ“] Pi-hole blocking is enabled

Did you mean pihole -g -f?

I was thinking if there were issues with the database and FTL could not open it (appearing as if it did not exists) it would be worth to try to recreate it completely.

pihole -g -f then.

Edit: -r tries to move the old backup data in and that doesn't exist most of the time. And if it does then it's pre-migration data that shouldn't be used anyways. pi-hole/gravity.sh at 0d8ece1be249fdc5993f01a45f8d0464257df819 ยท pi-hole/pi-hole ยท GitHub

issue persisting with -g -f flags:

[root@wgsea1 wg-api]# pihole -g -f
  [โœ“] 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
  Error: no such table: main.gravity
  [i] Number of gravity domains: 0 (0 unique domains)
  [i] Number of exact blacklisted domains: 0
  [i] Number of regex blacklist filters: 0
  [i] Number of exact whitelisted domains: 0
  [i] Number of regex whitelist filters: 0
  [โœ“] Flushing DNS cache
  [โœ“] Cleaning up stray matter

  [โœ“] DNS service is listening
     [โœ“] UDP (IPv4)
     [โœ“] TCP (IPv4)
     [โœ“] UDP (IPv6)
     [โœ“] TCP (IPv6)

  [โœ“] Pi-hole blocking is enabled

This is a fresh install, pulled straight from curl -sSL https://install.pi-hole.net | bash in stock CentOS 7.

Thanks again for your help, all!

I have attempted again in a fresh, updated CentOS 7 VM and made a new token - 2dtf499if9

Issue persisting with dev branch as well.

There was a report that this affects CentOS but a Debian install works fine. Are you able to create a Debian VM to verify?

Sure! I can knock that out when I get home.

1 Like

OK. Installed on Debian and working as expected. Odd! Token 7imwrj7dvz

Indeed odd, but helps narrow down the places to look by a huge amount!

1 Like

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