Please follow the below template, it will help us to help you!
If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.
Expected Behaviour:
When setting nameserver as my pi hole's local ip (192.168.15.1) in /etc/resolv.conf, addresses should resolve. nslookup someadre.ss 192.168.15.1 should also return the resolved address. This is on several machines all running Gentoo (23.0 openrc split-usr)
Actual Behaviour:
addresses are not resolved. nslookup pi-hole.net returns
;; connection timed out; no servers could be reached
Debug Token:
https://tricorder.pi-hole.net/ccuwlbcN/
I can ping the pi-hole (running on an up to date raspberryOS raspberry Pi 4) from the machines.
The only thing I see in the debug logs is that it fails to resolve on lo and eth0 and can resolve through an external public server, which I guess is the issue, but I'm not sure how to solve it. Previous topic with similar debug log says it might be a firewall issue (Pi-Hole DNS resolution not working in the weekend), but then it seems to have solved itself, and I'm a little at a loss.
Any help would be greatly appreciated, and I'll off course come back if I can solve it from my side.
Additional command results (ran on the pi-hole machine)
nslookup pi-hole.net
Server: 9.9.9.11
Address: 9.9.9.11#53
dig pi-hole.net 07:20:33
; <<>> DiG 9.18.24-1-Debian <<>> pi-hole.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34307
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 739283db1a67a3f80100000066050c35da01c6b7f96cc730 (good)
;; QUESTION SECTION:
;pi-hole.net. IN A
;; ANSWER SECTION:
pi-hole.net. 255 IN A 3.18.136.52
;; Query time: 15 msec
;; SERVER: 9.9.9.11#53(9.9.9.11) (UDP)
;; WHEN: Thu Mar 28 07:20:37 CET 2024
;; MSG SIZE rcvd: 84
Non-authoritative answer:
Name: pi-hole.netAddress: 3.18.136.52
The commands you ran on the Pi-hole machine show that the Pi-hole machine is not using itself for DNS resolution, it's using 9.9.9.11. That's fine for the Pi-hole machine but we also need to see what is happening on a client machine.
Where are you editing the /etc/resolv.conf file, on the Pi-hole machine? Pi-hole should not be using itself for DNS.
The test to see if Pi-hole (FTL) is listening is failing. There is nothing on the Pi-hole server that is ready to resolve DNS queries on port 53.
*** [ DIAGNOSING ]: Ports in use
udp:0.0.0.0:5353 is in use by avahi-daemon
udp:0.0.0.0:52641 is in use by avahi-daemon
udp:*:5353 is in use by avahi-daemon
udp:*:58610 is in use by avahi-daemon
tcp:0.0.0.0:22 is in use by sshd
[✓] tcp:0.0.0.0:80 is in use by lighttpd
tcp:127.0.0.1:25 is in use by exim4
tcp:[::]:22 is in use by sshd
[✓] tcp:[::]:80 is in use by lighttpd
tcp:*:8888 is in use by zrepl
tcp:[::1]:25 is in use by exim4
Does running pihole restartdns on the Pi-hole server return any response? The diagnostic shows a high server load which could lead to the Operating System killing processes like FTL to recover resources.
*** [ DIAGNOSING ]: Pi-hole diagnosis messages
count last timestamp type message blob1 blob2 blob3 blob4 blob5
------ ------------------- -------------------- ------------------------------------------------------------ -------------------- -------------------- -------------------- -------------------- --------------------
1 2024-03-28 06:58:20 LOAD excessive load 9.162109375 4
That is showing a load average of 9 for a server with 4 cores.
One of the databases was not able to be checked because it was locked, this could also happen with a very high system load.
*** [ DIAGNOSING ]: Pi-hole FTL Query Database
-rw-rw-r-- 1 pihole pihole 80K Mar 28 06:58 /etc/pihole/pihole-FTL.db
[i] Checking integrity of /etc/pihole/pihole-FTL.db ... (this can take several minutes)
[✗] Integrity errors in /etc/pihole/pihole-FTL.db found.
Error: in prepare, database is locked (5)
I see a ZFS replication daemon running, is this server using ZFS as the storage filesystem?
Hi, thanks for your detailed answer.
Pi-hole is not using itself as the dns server
➜ cat /etc/resolv.conf
Generated by NetworkManager
nameserver 9.9.9.11
nameserver 149.112.112.11
nameserver 2620:fe::11
➜ pihole restartdns
[✓] Restarting DNS server
And to answer your final question, yes, this pi has two functions, pi-hole and zfs backup. Could that be the issue ? It's been working for a while before that, though.
pihole-FTL seems to be running
systemctl status pihole-FTL 08:15:00
● pihole-FTL.service - Pi-hole FTL
Loaded: loaded (/etc/systemd/system/pihole-FTL.service; enabled; preset: enabled)
Active: active (running) since Tue 2024-04-02 08:10:39 CEST; 4min 27s ago
Process: 889823 ExecStartPre=/opt/pihole/pihole-FTL-prestart.sh (code=exited, status=0/SUCCESS)
Main PID: 889836 (pihole-FTL)
Tasks: 22 (limit: 3966)
CPU: 1.451s
CGroup: /system.slice/pihole-FTL.service
├─889836 /usr/bin/pihole-FTL -f
├─889885 /usr/bin/pihole-FTL -f
├─889886 /usr/bin/pihole-FTL -f
└─889887 /usr/bin/pihole-FTL -f
But then, I just checked and DNS currently works, so this might be that.
Would the solution be to separate the zfs backup machine from the pi-hole machine?
Thanks again for your support.