π ~1 min read
Table of contents
Symptom & Impact
Hostnames intermittently fail to resolve, breaking apt, curl, and service discovery on Ubuntu 22.04.
Environment & Reproduction
Ubuntu 22.04 LTS using systemd-resolved with /etc/resolv.conf symlink to stub; reproduce under invalid upstream DNS or broken split-DNS setup.
Root Cause Analysis
Stub resolver depends on correct upstream servers and routing domains; stale links or conflicting resolv.conf changes lead to query failure.
Quick Triage
Check resolvectl status, verify /etc/resolv.conf target, and test direct queries with resolvectl query and dig.
Step-by-Step Diagnosis
Inspect journalctl -u systemd-resolved, confirm DNS servers per interface, and validate reachability to upstream resolvers over UDP/TCP 53.

Solution – Primary Fix
Set correct DNS in netplan or resolved config, restart systemd-resolved, then flush caches using resolvectl flush-caches.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Pin DNS in NetworkManager profiles, deploy local caching resolver, or configure fallback DNS for outage tolerance.
Verification & Acceptance Criteria
Repeated queries succeed, apt update completes, and latency remains stable across multiple network interfaces.
Rollback Plan
Revert changed netplan and resolved files, restore original /etc/resolv.conf symlink state, and restart network services.
Prevention & Hardening
Monitor DNS error rates, avoid ad-hoc edits to resolv.conf, and keep network automation source-of-truth centralized.
Related Errors & Cross-Refs
Related Ubuntu 22.04 problems include netplan misconfiguration, VPN split-DNS issues, and firewall rules blocking DNS.
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
man systemd-resolved, man resolvectl, Ubuntu DNS troubleshooting docs, and RFC 1035 basics.
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.