Hello, I am attempting my first deployment of Pi hole. looks like a great product.
I am using docker, every time I deploy, the container starts. but UI never comes up. I restart the container, UI works but I get the following error, and things are not working correctly.
Not sure what I am doing wrong, hopefully someone can help
Info:
using pihole:latest
tried running pihole -g
tried deleting the DB's and restarting.
::: Docker start setup complete
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:
[✓] Cleaning up stray matter
root@pi:/# cat /etc/pihole/adlist.list
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
root@pi:/# pihole -g -r
[✓] 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_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 running
[✓] Pi-hole blocking is Enabled
That's the point. If changes are made to a file in /etc/pihole, they are overwritten by the information from the migration_backup, which includes all the information at the time of conversion . So, make the changes in the migration_backup folder.
As this is a docker related issue and pihole's container is not supposed to be updated (and the OP didn't mention v4 - > v5 update) the migration backup folder should be empty. Therfore is should not matter where the file is changed (or in this case created at all).
Indeed a typo... OOPS.
indeed also not a migration. new setup on docker.
root@pi:/# cat /etc/pihole/adlists.list
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
root@pi:/# pihole -g -r
[i] Restoring from migration backup...rm: cannot remove '/etc/pihole/gravity.db': 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
[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 running
[✓] Pi-hole blocking is Enabled
I decided to rebuild volumes and container. First boot, couldnt load the UI. Then i tried the above
First Boot:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
::: Starting docker specific checks & setup for docker pihole/pihole
OK: Checks passed for /etc/resolv.conf DNS servers
nameserver 127.0.0.1
nameserver 1.1.1.1
options timeout:15
options attempts:5
Assigning random password: HAR8cLA6
[i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u7
[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
chown: cannot access '': No such file or directory
chmod: cannot access '': No such file or directory
chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Setting password: HAR8cLA6
+ pihole -a -p HAR8cLA6 HAR8cLA6
[✓] New password set
Using default DNS servers: 8.8.8.8 & 8.8.4.4
DNSMasq binding to default interface: eth0
Added ENV to php:
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
"ServerIP" => "127.0.0.1",
"VIRTUAL_HOST" => "pi.hole",
Using IPv4 and IPv6
::: setup_blocklists now setting default blocklists up:
::: TIP: Use a docker volume for /etc/pihole/adlists.list if you want to customize for first boot
::: Blocklists (/etc/pihole/adlists.list) now set to:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
::: Testing pihole-FTL DNS: FTL started!
::: Testing lighttpd config: Syntax OK
::: All config checks passed, cleared for startup ...
::: Docker start setup complete
[i] Neutrino emissions detected...
[✓] Pulling blocklist source list into range
[✓] Preparing new gravity database
[i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[✓] Status: Retrieval successful
[i] Received 57322 domains
[i] Target: https://mirror1.malwaredomains.com/files/justdomains
[✓] Status: Retrieval successful
[i] Received 26853 domains
[i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
try with suggested:
root@pi:/# cat /etc/pihole/adlists.list
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
root@pi:/# ls -lha /etc/pihole/
total 92K
drwxrwxr-x 3 pihole pihole 4.0K Jun 25 07:55 .
drwxrwxr-x 53 root root 4.0K Jun 25 07:53 ..
-rw-r--r-- 1 root root 14 Jun 25 07:54 GitHubVersions
-rw-r--r-- 1 root root 65 Jun 25 07:54 adlists.list
-rw-r--r-- 1 root root 596 Jun 25 07:53 dns-servers.conf
-rw-rw-r-- 1 pihole pihole 0 May 10 13:50 gravity.db
-rw-r--r-- 1 root root 0 Jun 25 07:53 gravity_temp.db
-rw-r--r-- 1 root root 0 May 10 13:50 install.log
-rw-r--r-- 1 root root 0 May 10 13:50 list.0.raw.githubusercontent.com.domains
-rw-r--r-- 1 root root 0 May 10 13:50 list.1.mirror1.malwaredomains.com.domains
-rw-r--r-- 1 root root 0 May 10 13:50 list.2.s3.amazonaws.com.domains
-rw-r--r-- 1 root root 0 May 10 13:50 list.3.s3.amazonaws.com.domains
-rw-r--r-- 1 root root 36 Jun 25 07:53 local.list
-rw-r--r-- 1 root root 20 Jun 25 07:53 localbranches
-rw-r--r-- 1 root root 37 Jun 25 07:53 localversions
-rw-r--r-- 1 root root 0 May 10 13:50 logrotate
-rw-r--r-- 1 pihole pihole 0 May 10 13:50 macvendor.db
drwxr-xr-x 2 root root 4.0K May 10 13:50 migration_backup
-rw-r--r-- 1 pihole pihole 0 May 10 13:50 pihole-FTL.conf
-rw-r--r-- 1 root root 44K Jun 25 07:55 pihole-FTL.db
-rw-r--r-- 1 root root 449 Jun 25 07:53 setupVars.conf
-rw-r--r-- 1 root root 427 Jun 25 07:53 setupVars.conf.update.bak
root@pi:/# pihole -g -r
[✓] 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
[✓] Preparing new gravity database
[i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[✓] Status: Retrieval successful
[i] Received 57322 domains
[✓] Storing downloaded domains in new gravity database
[✓] Building tree
[✓] Swapping databases
[i] Number of gravity domains: 57322 (57322 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 running
[✓] Pi-hole blocking is Enabled
So it worked. why does the docker build not work out of the box? do i have a miss config? is this a bug?