📖 ~1 min read
Table of contents
Symptom & Impact
yum cannot download metadata because DNS lookups for repository hosts fail on RHEL 7 systems.
Environment & Reproduction
yum repolist returns Could not resolve host, and package operations fail even when IP routing appears available.
Root Cause Analysis
Incorrect nameserver entries, stale DHCP-provided resolver config, blocked DNS egress, or local caching DNS outage.
Quick Triage
Check /etc/resolv.conf, run getent hosts repo.example, and verify network stack health with systemctl status network and service network status.
Step-by-Step Diagnosis
Use journalctl -u network and journalctl -xe to correlate interface events with DNS failures.

Solution – Primary Fix
Capture current resolver and route settings, then apply corrected DNS values and test with yum makecache.
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
Set valid nameservers, restart networking via systemctl restart network or service network restart, then rerun yum clean all and yum update.
Verification & Acceptance Criteria
Confirm firewalld permits outbound UDP/TCP 53 and verify SELinux policy does not restrict local DNS forwarders.
Rollback Plan
Validate application units after updates with systemctl status to confirm package refresh completed successfully.
Prevention & Hardening
If DNS changes break internal lookups, restore previous resolver settings and retest before further yum operations.
Related Errors & Cross-Refs
Use redundant DNS servers, monitor resolver latency, and manage resolv.conf through consistent configuration tooling.
Related tutorial: View the step-by-step tutorial for rhel-7.
View all rhel-7 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Review RHEL 7 networking and yum troubleshooting documentation for resolver reliability best practices.
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.