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

Running dnf update or dnf makecache fails with metadata errors, timeouts, or 404 responses from configured repositories.

Environment & Reproduction

Run: dnf repolist -v, dnf clean all, and curl -I to the repo baseurl to confirm DNS and HTTPS reachability.

Root Cause Analysis

Cached metadata is stale, mirror URL is invalid, or proxy/SSL inspection breaks repository access for RHEL 9 hosts.

Quick Triage

Clear cache and rebuild: sudo dnf clean all && sudo rm -rf /var/cache/dnf && sudo dnf makecache. Validate /etc/yum.repos.d files.

Step-by-Step Diagnosis

Capture the failing dnf output showing repomd.xml or metalink failures for troubleshooting records.

Illustrative mockup for rhel-9 — rhel9-b08-p176-01.webp
DNF metadata error during repo refresh — Illustrative mockup — Progressive Robot

Solution – Primary Fix

After fixes, dnf makecache completes and repositories show current metadata timestamps.

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 rhel-9 — rhel9-b08-p176-02.webp
Successful dnf makecache on RHEL 9 — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Run sudo dnf check-update and confirm package lists are returned without metadata warnings.

Verification & Acceptance Criteria

Pin trusted mirrors, keep CA bundles current, and schedule a periodic dnf makecache timer in stable networks.

Rollback Plan

Restore previous repo files from backup and re-run dnf clean all if a new repository definition caused the failure.

Prevention & Hardening

Use Ansible to template /etc/yum.repos.d files and run dnf cache rebuild handlers after repo changes.

Review /var/log/dnf.log and journalctl -u dnf-makecache for detailed metadata download failures.

Related tutorial: View the step-by-step tutorial for rhel-9.

View all rhel-9 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Escalate with failing command output, repo file snippets, and network path results to your repository provider.

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.