πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Hosts intermittently fail DNS lookups, causing apt, API calls, and service discovery to break unpredictably. Applications appear unstable despite healthy network connectivity.

Environment & Reproduction

Ubuntu 22.04 LTS uses systemd-resolved with stub resolver at 127.0.0.53. Reproduce under upstream DNS latency, inconsistent DHCP-provided servers, or split-DNS misconfiguration.

Root Cause Analysis

Failures often come from unreachable upstream nameservers, invalid search domains, or resolver cache states combined with network transitions across interfaces and VPN links.

Quick Triage

Test direct DNS queries against configured upstreams and inspect current resolver status before restarting services. This distinguishes resolver service issues from external DNS outages.

Step-by-Step Diagnosis

Review resolved logs, interface DNS assignments, and query latency. Confirm whether failures are domain-specific, link-specific, or global across all nameservers.

Illustrative mockup for ubuntu-22-04-lts β€” resolved_timeout_logs
systemd-resolved timeout entries in journal β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Set reliable DNS servers in netplan, apply configuration, and restart resolved service. Clear stale cache and verify deterministic query responses across repeated tests.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-22-04-lts β€” resolvectl_fix_success
Stable resolver configuration validated with resolvectl β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Use local caching resolver like Unbound, set per-link DNS for VPN domains, or disable problematic DHCP DNS propagation where static resolver policy is required.

Verification & Acceptance Criteria

Repeated DNS queries return quickly without timeout, application endpoints resolve consistently, and resolver logs remain free of upstream failure bursts.

Rollback Plan

Restore prior netplan file, reapply networking, and restart systemd-resolved. If needed, temporarily point to known public resolvers while root-cause review continues.

Prevention & Hardening

Monitor DNS latency/error rates, define primary/secondary resolvers explicitly, and validate split-horizon DNS behavior in staging for all critical domains.

Often adjacent to DHCP lease churn, VPN route precedence issues, and stale /etc/resolv.conf symlink states in manually modified systems.

Related tutorial: View the step-by-step tutorial for Ubuntu 22.04 LTS.

View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Consult systemd-resolved documentation, netplan docs, and man pages for resolvectl(1), resolved.conf(5), and dig(1).

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β€” we respond within one business day.