;; communications error to 127.0.0.1#5335: timed out
I have a problem. I have tried troubleshooting this problem on and off for years at this point. I even asked for help about it in this forum. After a lot of tinkering (the moderators helped a lot, thx), I wholeheartedly convinced myself that this was a local issue. I still tried a few more times after that topic, but no dice.
I had almost happily forgotten about this issue, but then my dad decided to dig it out of the grave again. And I HAVE to fix it, no matter what, no weaseling my out this time. I have bashed my head again and again against this troublesome issue for two days, but no luck.
I searched around on the forums, and there were a few more cases of this same issue after my post, but their solution either doesn't work for me, or there is no solution and the topic was automatically closed after 21 days. So, I had no other choice except to come back here, just like last time. However, there are a few changes:
- No one is using the server except me. Last time, this meant prioritizing keeping Pi-hole running. No distractions this time.
- No reinstalling Raspberry Pi OS: I can't. I physically am not able to do it this time around. Please don't ask why.
- I have an FTP Server now, so getting files will be easier this time around.
The issue is the same this around:
Expected Behaviour:
According to pi-hole's documentation on unbound (NLnet has no online documentation really), I did the following:
sudo apt install unbound
and copied the configuration for /etc/unbound/unbound.conf.d/pi-hole.conf
from there.
Then installed Pi-hole with 127.0.0.1#5335
as the DNS.
Pi-hole and Unbound have not been configured after this, with the exception of:
logfile: "/var/log/unbound/unbound.log" verbosity: 1
for troubleshooting purposes. On that note, this is running on the latest version of Raspberry Pi OS, the only other application that is installed is vsftpd
.
Pi-hole works fine.
Unbound should work fine.
Actual Behaviour:
/etc/init.d/unbound status
returns
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; preset: enabled)
Active: active (running) since Sat 2024-07-27 18:45:36 +06; 1h 8min ago
Docs: man:unbound(8)
Main PID: 715 (unbound)
Tasks: 1 (limit: 3915)
CPU: 181ms
CGroup: /system.slice/unbound.service
└─715 /usr/sbin/unbound -d -pJul 27 18:45:36 Club-Net systemd[1]: Starting unbound.service - Unbound DNS server...
Jul 27 18:45:36 Club-Net systemd[1]: Started unbound.service - Unbound DNS server.
showing that it is working.
However,
dig wiby.com @127.0.0.1 -p 5335
returns
;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out; <<>> DiG 9.18.28-1~deb12u1-Debian <<>> wiby.com @127.0.0.1 -p 5335
;; global options: +cmd
;; no servers could be reached
almost every other
topic about this issue
gets stuck here.
Here is an excerpt from unbound.log, if it helps:
[1722084067] unbound[709:0] debug: module config: "subnetcache validator iterator"
[1722084067] unbound[709:0] notice: init module 0: subnetcache
[1722084067] unbound[709:0] warning: subnetcache: prefetch is set but not working for data originating from the subnet module cache.
[1722084067] unbound[709:0] debug: subnetcache: option registered (8)
[1722084067] unbound[709:0] notice: init module 1: validator
[1722084067] unbound[709:0] debug: reading autotrust anchor file /var/lib/unbound/root.key
[1722084067] unbound[709:0] info: trust point . : 1
[1722084067] unbound[709:0] info: assembled 0 DS and 1 DNSKEYs
[1722084067] unbound[709:0] info: DNSKEY:: . 86400 IN DNSKEY 257 3 8 AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3+/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kvArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+eoZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfdRUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwNR1AkUTV74bU= ;{id = 20326 (ksk), size = 2048b}[1722084067] unbound[709:0] info: file /var/lib/unbound/root.key
[1722084067] unbound[709:0] info: last_queried: 0 Thu Jan 1 06:00:00 1970
[1722084067] unbound[709:0] info: last_success: 0 Thu Jan 1 06:00:00 1970
[1722084067] unbound[709:0] info: next_probe_time: 0 Thu Jan 1 06:00:00 1970
[1722084067] unbound[709:0] info: query_interval: 0
[1722084067] unbound[709:0] info: retry_time: 0
[1722084067] unbound[709:0] info: query_failed: 0
[1722084067] unbound[709:0] info: [ VALID ] . 86400 IN DNSKEY 257 3 8 AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3+/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kvArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+eoZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfdRUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwNR1AkUTV74bU= ;{id = 20326 (ksk), size = 2048b} ;;state:2 ;;pending_count:0 last:Thu Jan 1 06:00:00 1970
[1722084067] unbound[709:0] debug: validator nsec3cfg keysz 1024 mxiter 150
[1722084067] unbound[709:0] debug: validator nsec3cfg keysz 2048 mxiter 150
[1722084067] unbound[709:0] debug: validator nsec3cfg keysz 4096 mxiter 150
[1722084067] unbound[709:0] notice: init module 2: iterator
[1722084067] unbound[709:0] debug: target fetch policy for level 0 is 3
[1722084067] unbound[709:0] debug: target fetch policy for level 1 is 2
[1722084067] unbound[709:0] debug: target fetch policy for level 2 is 1
[1722084067] unbound[709:0] debug: target fetch policy for level 3 is 0
[1722084067] unbound[709:0] debug: target fetch policy for level 4 is 0
[1722084067] unbound[709:0] debug: donotq: 127.0.0.0/8
[1722084067] unbound[709:0] debug: EDNS known options:
[1722084067] unbound[709:0] debug: Code: Bypass_cache_stage: Aggregate_mesh:
[1722084067] unbound[709:0] debug: edns-cli NO NO
[1722084067] unbound[709:0] debug: total of 59448 outgoing ports available
[1722084067] unbound[709:0] debug: start threads
[1722084067] unbound[709:0] debug: libevent 2.1.12-stable uses epoll method.
[1722084067] unbound[709:0] debug: no config, using builtin root hints.
[1722084067] unbound[709:0] debug: cache memory msg=66072 rrset=66072 infra=7808 val=66368 subnet=74504
[1722084067] unbound[709:0] info: start of service (unbound 1.17.1).
[1722084067] unbound[709:0] debug: autotrust probe timer callback
[1722084067] unbound[709:0] info: autotrust probe . DNSKEY IN
[1722084067] unbound[709:0] debug: retry probe set in 3489 seconds
[1722084067] unbound[709:0] debug: mesh_run: start
[1722084067] unbound[709:0] debug: subnetcache[module 0] operate: extstate:module_state_initial event:module_event_new
[1722084067] unbound[709:0] info: subnetcache operate: query . DNSKEY IN
[1722084067] unbound[709:0] debug: subnetcache: pass to next module
[1722084067] unbound[709:0] debug: mesh_run: subnetcache module exit state is module_wait_module
[1722084067] unbound[709:0] debug: validator[module 1] operate: extstate:module_state_initial event:module_event_pass
[1722084067] unbound[709:0] info: validator operate: query . DNSKEY IN
[1722084067] unbound[709:0] debug: validator: pass to next module
[1722084067] unbound[709:0] debug: mesh_run: validator module exit state is module_wait_module
[1722084067] unbound[709:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
[1722084067] unbound[709:0] debug: process_request: new external request event
[1722084067] unbound[709:0] debug: iter_handle processing q with state INIT REQUEST STATE
[1722084067] unbound[709:0] info: resolving . DNSKEY IN
[1722084067] unbound[709:0] debug: request has dependency depth of 0
[1722084067] unbound[709:0] info: priming . IN NS
[1722084067] unbound[709:0] debug: mesh_run: iterator module exit state is module_wait_subquery
[1722084067] unbound[709:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
[1722084067] unbound[709:0] info: iterator operate: query . NS IN
[1722084067] unbound[709:0] debug: iter_handle processing q with state QUERY TARGETS STATE
[1722084067] unbound[709:0] info: processQueryTargets: . NS IN
[1722084067] unbound[709:0] debug: processQueryTargets: targetqueries 0, currentqueries 0 sentcount 0
[1722084067] unbound[709:0] info: DelegationPoint<.>: 13 names (0 missing), 13 addrs (0 result, 13 avail) parentNS
[1722084067] unbound[709:0] info: A.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: B.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: C.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: D.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: E.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: F.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: G.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: H.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: I.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: J.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: K.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: L.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] info: M.ROOT-SERVERS.NET. * A
[1722084067] unbound[709:0] debug: ip4 198.41.0.4 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 199.9.14.201 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 192.33.4.12 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 199.7.91.13 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 192.203.230.10 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 192.5.5.241 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 192.112.36.4 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 198.97.190.53 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 192.36.148.17 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 192.58.128.30 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 193.0.14.129 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 199.7.83.42 port 53 (len 16)
[1722084067] unbound[709:0] debug: ip4 202.12.27.33 port 53 (len 16)
[1722084067] unbound[709:0] debug: attempt to get extra 2 targets
[1722084067] unbound[709:0] debug: rpz: iterator module callback: have_rpz=0
[1722084067] unbound[709:0] debug: selrtt 376
[1722084067] unbound[709:0] info: sending query: . NS IN
[1722084067] unbound[709:0] debug: sending to target: <.> 192.36.148.17#53
[1722084067] unbound[709:0] debug: dnssec status: expected
[1722084067] unbound[709:0] debug: mesh_run: iterator module exit state is module_wait_reply
[1722084067] unbound[709:0] info: mesh_run: end 2 recursion states (1 with reply, 0 detached), 1 waiting replies, 0 recursion replies sent, 0 replies dropped, 0 states jostled out
[1722084067] unbound[709:0] info: 0pvCD mod2 . NS IN
[1722084067] unbound[709:0] info: 1RDdc mod2 cb . DNSKEY IN
[1722084067] unbound[709:0] debug: autotrust probe timer 1 callbacks done
[1722084067] unbound[709:0] debug: serviced send timer
[1722084067] unbound[709:0] debug: EDNS lookup known=0 vs=0
[1722084067] unbound[709:0] debug: serviced query UDP timeout=376 msec
[1722084067] unbound[709:0] debug: inserted new pending reply id=c76e
[1722084067] unbound[709:0] debug: opened UDP if=0 port=27574
[1722084067] unbound[709:0] error: udp connect failed: Network is unreachable for 192.36.148.17 port 53 (len 16)
[1722084067] unbound[709:0] debug: svcd callbacks start
[1722084067] unbound[709:0] debug: worker svcd callback for qstate 0x5583299490
[1722084067] unbound[709:0] debug: mesh_run: start
[1722084067] unbound[709:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_noreply
[1722084067] unbound[709:0] info: iterator operate: query . NS IN
[1722084067] unbound[709:0] debug: process_response: new external response event
[1722084067] unbound[709:0] debug: iter_handle processing q with state QUERY RESPONSE STATE
[1722084067] unbound[709:0] debug: query response was timeout
[1722084067] unbound[709:0] debug: iter_handle processing q with state QUERY TARGETS STATE
[1722084067] unbound[709:0] info: processQueryTargets: . NS IN
[1722084067] unbound[709:0] debug: processQueryTargets: targetqueries 0, currentqueries 0 sentcount 1
[1722084067] unbound[709:0] info: DelegationPoint<.>: 13 names (0 missing), 13 addrs (13 result, 0 avail) parentNS
Any and all help regarding this issue would be greatly appreciated. I am truly at a loss regarding this right now.