named can be alive (pgrep -x named returns a PID) yet not answering on the serving interface. Process liveness checks pass, but clients experience timeouts and retries that propagate to every service depending on DNS.
Two diagnostic forks determine the fix path. The first: total outage (both UDP and TCP fail on the serving interface) versus UDP-works-TCP-fails. A total outage means the main DNS path is broken. A UDP-works-TCP-fails condition leaves large responses, DNSSEC-heavy answers, and zone transfers at risk while UDP-only health checks stay green. The second fork: loopback success versus serving-interface success. A query that succeeds against 127.0.0.1 confirms the daemon processes queries, not that real clients can reach it.
UDP carries standard queries and cache-served answers. TCP carries responses too large for UDP (truncated answers exceeding the EDNS buffer size), zone transfers (AXFR/IXFR), and DNSSEC-heavy responses with long signature chains. When TCP fails while UDP works, clients querying DNSSEC-signed zones receive truncated UDP answers and attempt TCP fallback. If TCP is blocked, the client sees a timeout or SERVFAIL. Zone transfers between primary and secondary nameservers use TCP exclusively; secondaries stop receiving updates and eventually serve stale data or expire the zone entirely.
Decision tree
flowchart TD
A["pgrep -x named alive?"] -->|no| B["Process down: total outage"]
A -->|yes| C["UDP dig @serving-ip?"]
C -->|fails| D["TCP dig @serving-ip?"]
C -->|works| E["TCP dig @serving-ip?"]
D -->|also fails| F["Total outage: port not bound, firewall, or hung process"]
D -->|works| G["UDP-only failure: check UDP-specific ACL or firewall rule"]
E -->|fails| H["UDP-works-TCP-fails: FD exhaustion, tcp-clients limit, or TCP firewall"]
E -->|works| I["Loopback OK: test from remote to rule out path, ACL, or view"]Common causes
| Cause | What it looks like | First thing to check |
|---|---|---|
| named not running or crash-looping | No process, or process restarting repeatedly | pgrep -x named and systemctl show named --property=NRestarts |
| Port 53 not bound on serving interface | Process alive, no socket on the expected IP | ss -lunp '( sport = :53 )' for UDP, ss -ltnp '( sport = :53 )' for TCP |
| Port conflict (systemd-resolved or other) | named starts, logs binding failure or falls back | ss -lunp '( sport = :53 )' to identify what holds the port |
| Firewall or network ACL block | Loopback works, remote fails | Test from an external host; check iptables -L -n or nft list ruleset |
| BIND ACL denial | Clients receive REFUSED, not timeout | Check allow-query, allow-recursion, allow-query-cache |
| TCP listener exhaustion or FD exhaustion | UDP works, TCP fails or refuses connections | ss -tan '( sport = :53 )', FD count via /proc/<pid>/fd |
| View or split-horizon mismatch | Some clients work, others fail | Check match-clients and view ordering in named.conf |
| Hung process (running but not processing) | Process exists, no response on any transport | rndc status timeout, check system load |
Quick checks
Run these in order. All are read-only and safe for production.
# Process liveness (use -x for exact match, not -f)
pgrep -x named
# Service status and restart count
systemctl is-active named
systemctl show named --property=NRestarts
# Listeners on port 53
ss -lunp '( sport = :53 )'
ss -ltnp '( sport = :53 )'
# UDP functional test (recursive resolver: probe a domain requiring recursion)
dig +time=2 +tries=1 @127.0.0.1 example.com A
# TCP functional test (recursive resolver)
dig +tcp +time=2 +tries=1 @127.0.0.1 example.com A
# Authoritative test (use a zone you serve, with +norecurse)
dig +time=2 +tries=1 +norecurse @127.0.0.1 <your-zone> SOA
dig +tcp +time=2 +tries=1 +norecurse @127.0.0.1 <your-zone> SOA
# Test from the serving interface IP, not loopback
dig +time=2 +tries=1 @<serving-ip> example.com A
# Control channel responsiveness (timeout means internal pressure)
timeout 5 rndc status
# File descriptor usage vs. limit
ls /proc/$(pgrep -x named)/fd | wc -l
grep "Max open files" /proc/$(pgrep -x named)/limits
How to diagnose it
Confirm the process is alive. Run
pgrep -x named. Use-x(exact match), not-f, to avoid false positives onnamed-checkzone,named-checkconf, or similar binaries. If the process is gone, checkdmesgfor OOM kills andsystemctl show named --property=NRestartsfor restart loops.Check whether port 53 is actually bound. Run
ss -lunp '( sport = :53 )'for UDP andss -ltnp '( sport = :53 )'for TCP. If no socket appears on the serving interface,namedeither failed to bind or is restricted bylisten-on. On Ubuntu/Debian,systemd-resolvedcan bind to port 53 beforenamedstarts.Test UDP on loopback. Run a role-correct query. For a recursive resolver, query a domain requiring recursion:
dig +time=2 +tries=1 @127.0.0.1 example.com A. For an authoritative server, query a locally served zone with+norecurse. A REFUSED response means the ACL denied the query, not that the service is dead. A timeout means the listener is not processing.Test TCP on loopback. Run the same query with
+tcp. If UDP works but TCP fails, the problem is TCP-specific: FD exhaustion,tcp-clientslimit reached (default 150 in BIND 9.18), or a firewall rule blocking TCP/53.Test from the serving interface IP. Repeat the UDP and TCP queries using the IP address that real clients use, not
127.0.0.1. If loopback works but the serving IP fails, the problem is in the network path, firewall, ACL, or view configuration.Test from a remote host. Run
digfrom an external machine targeting the serving IP. If local tests work but remote tests fail, the firewall, routing, or network ACL is blocking traffic. Use IP addresses, never a hostname that depends on the server under test, to avoid circular dependencies.Classify the failure. Use the decision tree to categorize the result and determine the fix path.
Metrics and signals to monitor
| Signal | Why it matters | Warning sign |
|---|---|---|
Process liveness (pgrep -x named) | Process gone means total outage for all clients | No PID returned |
| UDP listener on port 53 | No listener means all UDP queries are lost | ss -lunp shows no :53 socket |
| TCP listener on port 53 | No listener means transfers and large answers fail | ss -ltnp shows no :53 socket |
| UDP functional response (role-correct canary) | Primary service path validation | Timeout or unexpected RCODE |
| TCP functional response (role-correct canary) | Large answer and transfer path validation | Timeout while UDP works |
| Remote canary (from client network) | Catches path, firewall, ACL, and view issues | Remote fails, loopback works |
| File descriptor usage | Exhaustion causes silent query drops and TCP failures | Above 70% of Max open files limit |
TCP connection count (ss -tan '( sport = :53 )') | Approaching tcp-clients limit means new TCP refused | Sustained near 150 (default) or configured limit |
rndc status response time | Slow or failing control channel indicates internal pressure | Timeout or response taking more than 5 seconds |
| NRestarts counter | Restart loops pass liveness checks but fail under load | Counter incrementing |
Fixes
named not running or crash-looping
If the process is gone, check dmesg | grep -i oom for OOM kills. If OOM is the cause, configure max-cache-size to a safe value before restarting. If the process is crash-looping, check recent logs for assertion failures or fatal errors: journalctl -u named --since "10 min ago". Do not restart as a first fix without understanding why it stopped.
Port 53 not bound
If named is running but no socket appears on port 53, check for a port conflict. On systems with systemd-resolved, it may bind to port 53 before named starts. Check with ss -lunp '( sport = :53 )' to identify what holds the port. If listen-on is configured, verify it includes the serving interface address. A missing or overly restrictive listen-on directive causes named to bind only to loopback.
Firewall or network ACL blocking
If loopback works but remote queries fail, inspect firewall rules. Check iptables -L -n or nft list ruleset for rules affecting port 53. Verify that both UDP and TCP are allowed. A common pattern is UDP/53 open but TCP/53 blocked, which produces the UDP-works-TCP-fails symptom. Also check upstream firewalls, cloud security groups, and network ACLs outside the host.
BIND ACL denial (REFUSED)
A REFUSED response means the ACL denied the query, not that the service is dead. Check allow-query, allow-recursion, allow-query-cache, and view match-clients in named.conf. Use named-checkconf -p /etc/named.conf to see the effective configuration. Correct the ACL to include the client subnet.
TCP-specific failure (FD exhaustion or tcp-clients limit)
If UDP works but TCP fails, check two things. First, count open file descriptors: ls /proc/$(pgrep -x named)/fd | wc -l against the limit in /proc/<pid>/limits. FD exhaustion causes BIND to silently drop queries and fail to accept new TCP connections. Increase the OS-level limit via systemd LimitNOFILE or ulimit.
Second, check concurrent TCP connections against the tcp-clients limit (default 150 in BIND 9.18). Use ss -tan '( sport = :53 )' to count established connections. If legitimate traffic is exhausting the limit, raise it and ensure FD headroom scales accordingly.
View or split-horizon mismatch
If some clients work and others fail, examine view configuration. Views are evaluated in order, and a client may match the wrong view or no view at all. Check match-clients and the ordering of view blocks in named.conf. Test with dig from a source IP that represents the failing client subnet to reproduce the issue.
Prevention
- Monitor both transports separately. A UDP-only health check will not catch TCP failures. Test both with role-correct canaries.
- Monitor from the serving interface, not just loopback. Loopback success hides firewall, ACL, and view problems. Test against the IP that real clients use.
- Use IP addresses for monitoring targets, never hostnames. A monitoring check that resolves the DNS name of the server under test creates a circular dependency.
- Track file descriptor usage as a percentage of the limit. FD exhaustion is cliff-edge and silent. Alert above 70%.
- Verify zone loads after every
rndc reload.namedstarts successfully even if zones fail to load. A post-reload check catches silent failures. - Define sustained failure as 3+ consecutive failures over 2-5 minutes. A single timeout may be transient packet loss. Sustained failure is actionable.
- Use
pgrep -x named, notpgrep -f named. The-fflag matchesnamed-checkzone,named-checkconf, and other binaries, producing false positives.
How Netdata helps
- Per-second UDP and TCP query counters let you see the moment one transport degrades while the other stays healthy. Correlating the divergence with FD usage and TCP connection count isolates the cause.
- Process liveness and restart count are tracked continuously. A crash-loop that passes a periodic liveness check is visible as a climbing NRestarts counter.
- File descriptor monitoring surfaces FD exhaustion before it becomes silent query drops. Correlating FD count with TCP failures and query drops confirms the cause.
- Kernel UDP receive buffer errors (
UdpRcvbufErrorsfrom/proc/net/snmp) catch packet loss that BIND never sees. If queries are disappearing but BIND’s counters show nothing, kernel drops are the likely cause.






