This is a new install as a backup for another instance of Pi-hole on my network. This install is on a Raspberry Pi 4B running Raspbian 10 (Buster). The Pi has been running unrelated software with no DNS or Internet access issues.
Actual Behaviour:
I am running install via sudo bash basic-install.sh after cloning the repo to my local machine, which did not previously have Pi-hole installed. The install ends with:
[✗] DNS resolution is currently unavailable
[✗] DNS resolution is not available
(I get the same error using pihole -g.)
/etc/resolv.conf contains: nameserver 8.8.8.8, systemctl shows that pihole-FTL is running, the admin console is responding on tcp/80, and DNS resolution is working (tested both locally and from another machine on my home network pointing to this new installation.)
In other words, it seems that everything is working, but I do see errors in the debug log and I'd like to have the installation finish cleanly. (I have tried both update and reset several times.)
[✓] Web interface X-Header: X-Pi-hole: The Pi-hole Web interface is working!
*** [ DIAGNOSING ]: Gravity Database
-rw-rw-r-- 1 pihole pihole 92K Jul 10 16:05 /etc/pihole/gravity.db
*** [ DIAGNOSING ]: Info table
property value
-------------------- ----------------------------------------
version 15
Last gravity run finished at:
Your gravity database may be corrupt:
[2022-07-10 18:06:09.930 20964/T20968] gravityDB_count(SELECT value FROM info WHERE property = 'gravity_count';) - SQL error step no more rows available
What are the complete outputs of the following from the Pi terminal:
pi@pi2:~ $ pihole-FTL sqlite3 gravity.db "PRAGMA integrity_check"
ok
pi@pi2:~ $ pihole -g -f
[✓] Deleting existing list cache
[✗] DNS resolution is currently unavailable
[✗] DNS resolution is not available
though clearly, DNS resolution is available:
pi@pi2:~ $ host pi-hole.net
pi-hole.net has address 3.18.136.52
pi-hole.net mail is handled by 10 sunfire.mxrouting.net.
pi-hole.net mail is handled by 20 sunfire-relay.mxrouting.net.
I am planning to install Unbound after I get pi-hole running; would it help/hurt this process if I were to install it now? I'm certainly willing to wait, just figured I'd mention it.
The machine hosting Pi-hole would use 8.8.8.8 for DNS.
Try
dig pi-hole.net @192.168.0.49
According to your debug log, I'd expect that to fail:
*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✗] Failed to resolve on lo (127.0.0.1)
[✓] No IPv4 address available on eth0
[✗] Failed to resolve on wlan0 (192.168.0.49)
[✓] doubleclick.com is 142.250.72.110 via a remote, public DNS server (8.8.8.8)
Could you provide a new debug token, so we could verify that at least your gravity has been rebuilt?
Your gravity database is still empty.
This also explains the reported failure, as that would be for a blocked domain, which would have to be retrieved from the database.
Thanks, what I was asking (not very clearly, sorry) was whether it was expected that it would be listening at this point and on those ports. I'm a perimeter security engineer in my spare time (well, I don't let my boss know I consider it spare ). I am most definitely not a Linux newbie and not afraid fo the CLI, if there's anything I can run that might help further diagnose/resolve this.
# Title: StevenBlack/hosts
#
# This hosts file is a merged collection of hosts from reputable sources,
# with a dash of crowd sourcing via GitHub
#
# Date: 04 July 2022 21:06:51 (UTC)
# Number of unique domains: 110,091
pi@pi2:~ $ pihole -g -f
[i] Creating new gravity database
[i] Migrating content of /etc/pihole/adlists.list into new database
[✓] Deleting existing list cache
[✗] DNS resolution is currently unavailable
[✗] DNS resolution is not available
I stopped/started pihole-FTL using systemctl instead of service, any chance that made a difference?
Also, because it's always permissions, here's /etc/pihole, in case something looks wrong:
This shows a number of issues: your gravity.db is still empty and there is no log output of /var/log/pihole/FTL.log. Also your local.list is missing, which should have been generated by gravity.