Skip to content
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

Newly installed Container will not update Gravity DB #639

Closed
1 task
DarthDobber opened this issue Jun 10, 2020 · 11 comments
Closed
1 task

Newly installed Container will not update Gravity DB #639

DarthDobber opened this issue Jun 10, 2020 · 11 comments

Comments

@DarthDobber
Copy link

This is a: Run Issue

Details

I created the container using these options:

docker create --name=pihole -p 53:53/udp -p 53:53/tcp -p 80:80 -p 443:443 -e TZ="America/Chicago" -v /media/pihole/etc-pihole:/etc/pihole -v /media/pihole/dnsmasq.d:/etc/dnsmasq.d --dns=127.0.0.1 --dns=1.1.1.1 --restart=unless-stopped --hostname pihole -e VIRTUAL_HOST="pihole" -e PROXY_LOCATION="pihole" -e ServerIP="127.0.0.1" pihole/pihole:latest

When I attempt to run "pihole -g" this is the message I get back.

Error: no such table: info
[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

[✗] Unable to update gravity timestamp in database /etc/pihole/gravity.db
Error: near line 2: no such table: info
Error: no such table: vw_gravity
Error: no such table: vw_gravity
[i] Number of gravity domains: ( unique domains)
Error: near ")": syntax error
Error: no such table: vw_blacklist
[i] Number of exact blacklisted domains:
Error: no such table: vw_regex_blacklist
[i] Number of regex blacklist filters:
Error: no such table: vw_whitelist
[i] Number of exact whitelisted domains:
Error: no such table: vw_regex_whitelist
[i] Number of regex whitelist filters:
[✓] Flushing DNS cache
[✓] Cleaning up stray matter

[✓] DNS service is running
[✓] Pi-hole blocking is Enabled

I have attempted to install on Ubuntu 16, 17, 18 and 20 and get the same behavior on all of them.

Related Issues

  • I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar

How to reproduce the issue

  1. Environment data
  • Operating System: Ubuntu 18.04 Server
  • Hardware: PC
  • Kernel Architecture:
  • Docker Install Info and version:
    • Software source:
    • Supplimentary Software: None
  • Hardware architecture: 64 bit
  1. docker-compose.yml contents, docker run shell command, or paste a screenshot of any UI based configuration of containers here
  2. any additional info to help reproduce

These common fixes didn't work for my issue

  • [ x ] I have tried removing/destroying my container, and re-creating a new container
  • [ x ] I have tried fresh volume data by backing up and moving/removing the old volume data
  • [ x ] I have tried running the stock docker run example(s) in the readme (removing any customizations I added)
  • [ x ] I have tried a newer or older version of Docker Pi-hole (depending what version the issue started in for me)
  • [ x ] I have tried running without my volume data mounts to eliminate volumes as the cause

If the above debugging / fixes revealed any new information note it here.
Add any other debugging steps you've taken or theories on root cause that may help.

@ericphan
Copy link

I'm having the same issues

OS: Windows
Docker for windows community

Workarounds I've managed are:
From the host delete gravity.db and gravity_temp.db
From the container run pihole -g -r

This seems to fix the issue, but eventually (maybe after a couple of days) the gravity.db isn't accessible again

@thesnarkyone
Copy link

I having the same problem with running this as a container in Azure (tell me if I have this completely wrong, I am learning a new technology here)
[✗] Unable to build gravity tree in /etc/pihole/gravity_temp.db
Error: no such table: main.gravity

[✗] Unable to update gravity timestamp in database /etc/pihole/gravity.db
Error: near line 2: no such table: info
Error: no such table: vw_gravity
Error: no such table: vw_gravity
[i] Number of gravity domains: ( unique domains)
Error: near ")": syntax error
Error: no such table: vw_blacklist
[i] Number of exact blacklisted domains:
Error: no such table: vw_regex_blacklist
[i] Number of regex blacklist filters:
Error: no such table: vw_whitelist
[i] Number of exact whitelisted domains:
Error: no such table: vw_regex_whitelist
[i] Number of regex whitelist filters:
[i] Cleaning up stray matter...
�[K [✓] Cleaning up stray matter

[✓] DNS service is running
[✓] Pi-hole blocking is Enabled
Pi-hole version is v5.1.1 (Latest: v5.1.1)
AdminLTE version is v5.1 (Latest: v5.1)
FTL version is v5.1 (Latest: v5.1)
[cont-init.d] 20-start.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting pihole-FTL (no-daemon) as root
Starting crond
Starting lighttpd
[services.d] done.
Error: no such table: info
Error: no such table: vw_gravity
Error: no such table: vw_gravity
Error: near ")": syntax error
Error: no such table: vw_blacklist
Error: no such table: vw_regex_blacklist
Error: no such table: vw_whitelist
Error: no such table: vw_regex_whitelist

I deleted the gravity.db and gravity_temp.db then ran pihole -g -r

Same problem.

@diginc
Copy link
Collaborator

diginc commented Jul 22, 2020

If running without volumes didn't solve the issue, its probably not a host/file system permission problem so that leaves 2 other common docker problems to check:

  • --privileged mode to grant the container full powers
  • shared memory is the only other issue but if you aren't running heavy traffic this shouldn't be a problem.

@thesnarkyone
Copy link

I think that means that this container will not run properly as an Azure Container. From what I can see they do not allow privileged mode?

BTW, thanks for your help. Pihole is so useful and awesome.

@diginc
Copy link
Collaborator

diginc commented Jul 23, 2020

Normally privileged is not required so trying privileged mode is just to help debug the issue and see if it helps or not - it has helped with other non standard linux/amd64 platforms on certain problems that are hard for me to reproduce.

@maxymo
Copy link

maxymo commented Dec 5, 2020

I am having the same problem in a Linux server and Docker Compose, I have the pihole config files mounted in a samba share, container has permissions as it created all config files there but when I move the config files to a physical folder in Linux server everything works.

The samba share folder is even mounted with 777 permissions, don't understand what is the problem with it.

@dschaper
Copy link
Member

dschaper commented Dec 6, 2020

I don't think SMB shares have the necessary file system metadata to work with Docker.

Edit: https://stackoverflow.com/a/27996394

@poldim
Copy link
Contributor

poldim commented Feb 17, 2021

I am having the same problem in a Linux server and Docker Compose, I have the pihole config files mounted in a samba share, container has permissions as it created all config files there but when I move the config files to a physical folder in Linux server everything works.

The samba share folder is even mounted with 777 permissions, don't understand what is the problem with it.

I'm running into a similar issue and it seems to have something to do with networking config in my docker host. If I go back to a previous docker compose v2 (based on this), it works (but conflicts with my newer v3 dockers already working well on macvlan.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

@CastixGitHub
Copy link

CastixGitHub commented Apr 27, 2022

I experienced the same issue.
I'm using compose, without privileges and without any capability

EDIT:
nevermind, it was an issue derivated from dns resolution being broken:
I had nameserver 127.0.0.11 (note the extra 1) in /etc/resolv.conf
EDIT2: ok, there is likely too much informations on the subject,
and many issues like #342 #540 #945 #1035 and a reddit post
.11 is right.
so maybe, the readme and examples may suggest the user to bind ports with the host ip (as suggested in the reddit post) as it's already suggested to set a static ip for pihole, it makes more sense than changing the docker networks for me

@rdwebdesign
Copy link
Member

rdwebdesign commented Apr 27, 2022

A lot has changed in pi-hole's docker images since the last comment on this issue (Feb 2021).

If you think you have a similar problem, please open a new issue.
Include image version and a debug token, if possible.

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

No branches or pull requests

9 participants