Unbound Pi-hole resolving with huge delay - throwing 4711 - hostname problem

I had the problem with Pi-hole not resolving anymore - FTL was not working anymore. Fixed this. But solution was not found straight forward. Looks like I broke something else.

Three different behaviors I need to fix:

  1. Sometimes URLs cannot be resolved - Pi-hole log throwing SERVFAIL. It could be that this only happens if „new“ addresses hit the unbound pi-hole which usually takes longer. But for me I even need to open it several times before it is finally successful.

  2. Reconfiguring of the Pi-hole via the UI throws a 4711 error („PHP error (2): fsockopen(): unable to connect to 127.0.0.1:4711 (Connection refused) in /var/www/html/admin/scripts/pi-hole/php/FTL.php:47“) from time to time. Never had this issue before.

  3. Hostnames are not found and revolved. I already added local DNS records. But Pi-hole ignores those but cannot get and make use of DHCP.

I use a Raspi 4 for which is used in parallel for HomeBridge and ioBroker as well as smaller stuff. Whole setup is connected via Ethernet - directly to my FritzBox which I also use as DHCP server. IPv6 is disable in my network. Software is update to date.

My initial error which now led to these behaviors pushed me to change main PI-hole config files. I even reinstalled Pi-hole and unbound. Could be that this was a bad idea…

Looks strange:

pi@HomeBridge:/etc/init.d $ host sigok.verteiltesysteme.net
Host sigok.verteiltesysteme.net not found: 2(SERVFAIL)
pi@HomeBridge:/etc/init.d $ host sigfail.verteiltesysteme.net
Host sigfail.verteiltesysteme.net not found: 2(SERVFAIL)
pi@HomeBridge:/etc/init.d $ ping sigok.verteiltesysteme.net
ping: sigok.verteiltesysteme.net: Temporärer Fehler bei der Namensauflösung
pi@HomeBridge:/etc/init.d $ ping sigfail.verteiltesysteme.net
ping: sigfail.verteiltesysteme.net: Temporärer Fehler bei der Namensauflösung
pi@HomeBridge:/etc/init.d $ dig sigok.verteiltesysteme.net

; <<>> DiG 9.11.5-P4-5.1+deb10u8-Raspbian <<>> sigok.verteiltesysteme.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 17635
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;sigok.verteiltesysteme.net.    IN      A

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: So Feb 12 17:35:40 CET 2023
;; MSG SIZE  rcvd: 55

pi@HomeBridge:/etc/init.d $ dig sigfail.verteiltesysteme.net

; <<>> DiG 9.11.5-P4-5.1+deb10u8-Raspbian <<>> sigfail.verteiltesysteme.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 53284
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;sigfail.verteiltesysteme.net.  IN      A

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: So Feb 12 17:35:47 CET 2023
;; MSG SIZE  rcvd: 57

verteiltesysteme.net has been broken for a while now. Use https://dnssec.works.

1 Like

That helped me already! Fixed different topics regarding my Pi-hole. Works great now!

Only issue left is the missing local name resolution: I tried a lot already. I am using Conditional Forwarding. Checkmarks for non-FQDN and reverse lookups forwarding enabled/disabled. My resolv.com links to contains 127.0.01 as nameserver, domain is set (of course the same stored within Conditional Forwarding config). DHCP on my Fritzbox. I even edited a comprehensive list of Pi-hole internal DNS names (/etc/pihole/custom.list). The /etc/hosts/ only contains the 127.0.0.1/localhost. 01-piholeconfi in /etc/dnsmasq.d/ looks like this:

#addn-hosts=/etc/pihole/local.list
#addn-hosts=/etc/pihole/custom.list
localise-queries
no-resolv
log-queries
log-facility=/var/log/pihole/pihole.log
log-async
cache-size=10000
#bogus-priv
server=127.0.0.1#5353
domain-needed
expand-hosts
bogus-priv
local-service
rev-server=192.168.0.0/24,192.168.178.1
server=/fritz.box/192.168.178.1

Pi-hole config in pihole-FTL.conf:

RATE_LIMIT=2000/60
BLOCK_TTL=10
BLOCK_ICLOUD_PR=true
#SHOW_DNSSEC=true
NAMES_FROM_NETDB=true
REFRESH_HOSTNAMES=IPV4
RESOLVE_IPV4=yes
RESOLVE_IPV6=yes
REFRESH_HOSTNAMES=ALL
CHECK_LOAD=false
CHECK_SHMEM=90
CHECK_DISK=90
CNAME_DEEP_INSPECT=true
#BLOCK_ESNI=true
REPLY_WHEN_BUSY=ALLOW
PIHOLE_PTR=HOSTNAMEFQDN
MAXDBDAYS=365
DBINTERVAL=60
DBIMPORT=yes
PRIVACYLEVEL=0

Anyone with an idea?

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

Uploaded. URL is https://tricorder.pi-hole.net/5ltO0ihe/

Btw, from time to time I still get the strange 4711 error messages when reconfiguring via the UI.

Can someone have a look?

It will have expired now, its only available for 48 hours. Would you please be able to create a fresh debug log and upload and post the new token URL.

Thanks in advance! Log is here: https://tricorder.pi-hole.net/TEkjlQMM/

Regarding this item:

  • the error PHP error (2): fsockopen(): unable to connect to 127.0.0.1:4711 (Connection refused) only means connection to FTL failed (probably because FTL was offline).
    Nothing else can be inferred from this PHP error message.
1 Like

Your debug log shows FTL is now running and resolving addresses without issues.

OK, that sounds good. I also do not see issues soured the main functionality. Good to hear! Message also does not occur too often.

But still my Pi-hole does not resolves names. In the meantime it again uses local DNS names configured in the custom list. Even though conditional forwarding is enabled it does not use names from the DHCP server.

You have an idea here?

For such a hostname you observe as not found, what's the output of:

nslookup hostname

$ nslookup TiPhone
;; connection timed out; no servers could be reached

$ nslookup TiPhone.fritz.box
Server: 127.0.0.1
Address: 127.0.0.1#53

** server can't find TiPhone.fritz.box: NXDOMAIN

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.