Error: no such table: main.gravity - Pi-hole v. 5.6

Hello there,

I read so many posts about this problem and i tried to solve it yesterday within my 3 hours break with no success. I installed Pi-hole yesterday as a new installation on my freshly installed respberry-Pi 4.

Expected Behaviour:

  • Host: Raspberry Pi 4
  • Pi-hole version is v5.6 (Latest: v5.6)
  • AdminLTE version is v5.8 (Latest: v5.8)
  • FTL version is v5.11 (Latest: v5.11)

I have tried the following commands to repair the missing database:

Actual Behaviour:

This commands gives the following output.

pihole -g -r
pihole -g -f

[βœ“] Restoring from migration backup
[i] Creating new gravity database
[i] Migrating content of /etc/pihole/adlists.list into new database
[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
[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

Debug Token:

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

This is the administration Panel how it looks like (no Domains on Blocklist)

In the settings section, there is also no "Blocklists" tab as meantionned in this post:

Any help would appreciated.

Greetings
Flippi

Sorry to hear you had issues.

Is a harmful command if you are don't have a migration update from a pre-v5.0 version of Pi-hole (as is the case for a fresh installation). This will be clarified by the next update which is planned soon.

Please remove the broken database

sudo rm /etc/pihole/gravity.db

and reconfigure your Pi-hole using

pihole -r

where you chose "Reconfigure" to get a fresh database.

Hi and thanks a lot! This was quite helpful and itΕ› working now!

You are awesome guys.

Greetings

This worked! thank you.