πŸ“– ~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

dnf update hangs or fails with metadata download timeout, slow mirror, or Curl error messages on RHEL 9.

Environment & Reproduction

Run `dnf repolist -v` and `ping -c 3 cdn.redhat.com` to verify repository and basic network reachability.

Root Cause Analysis

Inspect cache and RPM database health with `dnf clean all` then `rpm –rebuilddb` if corruption is suspected.

Quick Triage

If using a local proxy or DNS cache, verify it with `systemctl status squid` or `systemctl status named`.

Step-by-Step Diagnosis

Review resolver and networking logs with `journalctl -b -u NetworkManager` and `journalctl -b | grep -i dnf`.

Illustrative mockup for rhel-9 β€” rhel9-b01-p01-dnf-repolist.webp
Checking enabled repositories before troubleshooting dnf timeouts β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Refresh metadata using `dnf clean all && dnf makecache –refresh`, and update mirror settings if needed.

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-b01-p01-dnf-clean-makecache.webp
Refreshing cache and validating metadata retrieval on RHEL 9 β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Confirm outbound HTTPS is allowed and no restrictive zone policy exists in `firewalld` for client traffic.

Verification & Acceptance Criteria

SELinux usually does not block outbound dnf, but confirm with `getenforce` and audit review when custom policy exists.

Rollback Plan

Reboot once and run `dnf check-update` to ensure metadata downloads are stable after restart.

Prevention & Hardening

Keep `/etc/dnf/dnf.conf` clean, avoid stale proxy settings, and schedule routine cache refresh checks.

If custom repository edits caused failure, restore known-good `.repo` files from backup and retry.

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

Use `man dnf.conf` and Red Hat content delivery guidance for repository troubleshooting.

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.