Skip to content

SQLite3: no such table: main.antigravity #1801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hugoduraes opened this issue Apr 1, 2025 · 13 comments
Closed

SQLite3: no such table: main.antigravity #1801

hugoduraes opened this issue Apr 1, 2025 · 13 comments

Comments

@hugoduraes
Copy link

Versions

  • Pi-hole: v6.0.6
  • AdminLTE: v6.1
  • FTL: v6.1

Platform

  • OS and version: Debian 12
  • Platform: Docker

Expected behavior

FTL logs without "SQLite3: no such table: main.antigravity" error.

Actual behavior / bug

FTL logs show a bunch of "no such table: main.antigravity" errors similar to the following:

2025-04-01 21:00:05.773 ERROR SQLite3: no such table: main.antigravity in "SELECT adlist_id from vw_antigravity WHERE domain = ? AND group_id IN (0);" (1)
2025-04-01 21:00:05.773 ERROR domain_in_list("<redacted>", 0x772fd0d47028, antigravity): Failed to perform step: SQL logic error

I just did a fresh install and the error persists.

Steps to reproduce

Steps to reproduce the behavior:

I can't reproduce it, it eventually shows up on the logs.

Debug Token

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

@PromoFaux
Copy link
Member

** [ DIAGNOSING ]: Gravity Database
-rw-rw-r-- 1 pihole pihole 13M Apr  1 21:39 /etc/pihole/gravity.db

*** [ DIAGNOSING ]: Info table
   property              value                                   
   --------------------  ----------------------------------------
   version               19                                      

Interesting, your gravity database appears to be the correct version, so that table (view?) should exist...

I notice you are running in Docker - do you still see the issue if you run the container without any volumes attached?

Another thing to try is to delete the gravity.db from your host mount and have the startup build it again...

@PromoFaux PromoFaux transferred this issue from pi-hole/pi-hole Apr 2, 2025
@hugoduraes
Copy link
Author

hugoduraes commented Apr 3, 2025

@PromoFaux

I notice you are running in Docker - do you still see the issue if you run the container without any volumes attached?

Haven't tried this yet, I can try it later today and leave feedback here.

Another thing to try is to delete the gravity.db from your host mount and have the startup build it again...

I did that but the problem persisted. Then I tried a fresh install and the issue remained.

@hugoduraes
Copy link
Author

hugoduraes commented Apr 4, 2025

@PromoFaux Yesterday I've tried to run the container without volumes attached but the problem persisted!

This is my primary instance of pihole, which is running on Debian LXC on Proxmox. I have another instance running on a Raspberry Pi which doesn't suffer from this issue.

Any hint on what might be the problem?

@PromoFaux
Copy link
Member

Forgive what is perhaps a silly question... If you're running it in a Debian LXC on proxmox, why not install it as though it were bare metal rather than Docker?

@hugoduraes
Copy link
Author

hugoduraes commented Apr 4, 2025

I guess I could do it. The reasoning for it was because I'm provisioning both instances with a custom Ansible playbook and it was easier for me to use Docker so that I don't have to deal with differences between the two systems: Debian LXC on Proxmox vs Raspberry Pi OS.

@PromoFaux
Copy link
Member

Ah OK - I figured the one you had on the Raspberry Pi was bare metal too.

Interesting that you're seeing the same issue even without volumes attached to the container. What tag are you pulling?

@hugoduraes
Copy link
Author

I'm pulling latest.

@hugoduraes
Copy link
Author

I've just reinstalled the container from scratch again and I'll keep an eye on the logs. If the issue shows up again, I'll upload the debug log and post the link to it here.

@PromoFaux
Copy link
Member

It's very strange - I am unable to repro this currently.

@dschaper
Copy link
Member

dschaper commented Apr 4, 2025

You are running Docker inside of an lxc? What is the contents of the .conf file for the container? Is the container privileged or unprivileged? What features do you have set for the container? lxc containers are very finicky with filesystem permissions and adding in Docker on top of that just adds to the configuration mess.

@yubiuser
Copy link
Member

yubiuser commented Apr 4, 2025

I've seen this error in v6 quite a few times. I have no idea what causes this. Usually it was "fixed" by doing a teleporter backup, removing the gravity.db, run gravity and restoring the backup.

@hugoduraes
Copy link
Author

hugoduraes commented Apr 4, 2025

You are running Docker inside of an lxc? What is the contents of the .conf file for the container? Is the container privileged or unprivileged? What features do you have set for the container? lxc containers are very finicky with filesystem permissions and adding in Docker on top of that just adds to the configuration mess.

There you go:

arch: amd64
cores: 1
features: nesting=1
hostname: pihole-primary
memory: 512
net0: name=eth0,bridge=vmbr0,firewall=1,gw=<redacted>,gw6=<redacted>,hwaddr=<redacted>,ip=<redacted>,ip6=<redacted>,type=veth
onboot: 1
ostype: debian
rootfs: local-lvm:vm-107-disk-0,size=3G
swap: 512
unprivileged: 1
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file

Btw, since my last fresh install, the error has not shown yet. Let's see if it remains like this. 🤞

Regarding lxc and docker, you're right. Do you think this might be related with file permissions? The container not being able to access the database file and consequently throwing that error?

@hugoduraes
Copy link
Author

Closing as this as stopped happening after my last fresh install. Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants