📖 ~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

Name lookups randomly fail, breaking package installs, API calls, and internal service discovery.

Environment & Reproduction

Ubuntu 24.04 hosts using systemd-resolved stub resolver with mixed upstream DNS servers.

Root Cause Analysis

Unreliable upstream resolvers and timeout fallback behavior produce intermittent NXDOMAIN or SERVFAIL.

Quick Triage

Check resolver status and current upstream server health from the host perspective.

resolvectl status; ping -c 2 1.1.1.1

Step-by-Step Diagnosis

Test repeated queries, inspect per-link DNS, and review resolved logs for timeout spikes.

for i in {1..10}; do resolvectl query archive.ubuntu.com; done; sudo journalctl -u systemd-resolved --since '2 hours ago'
Illustrative mockup for ubuntu-24-04-lts — resolved_dns_problem
systemd-resolved showing degraded DNS upstream — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Set stable DNS servers in netplan, apply configuration, and restart resolved for clean state.

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

sudoedit /etc/netplan/01-netcfg.yaml && sudo netplan apply && sudo systemctl restart systemd-resolved
Illustrative mockup for ubuntu-24-04-lts — resolved_dns_fix_success
Pinned DNS servers and resolver health checks succeeding — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Deploy local caching resolver or conditional forwarding for split-horizon enterprise domains.

Verification & Acceptance Criteria

Repeated queries succeed with low latency and no resolver timeout bursts in logs.

Rollback Plan

Revert netplan DNS entries and restore previous nameserver set if new servers underperform.

Prevention & Hardening

Monitor resolver latency and automate alerts on sustained SERVFAIL/NXDOMAIN anomalies.

Related to network route flaps and VPN DNS leakage conditions.

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

View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

systemd-resolved man pages and Ubuntu networking documentation.

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.