📖 ~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 makecache` and package installs fail with timeout or mirror errors, delaying patching and security updates.

Environment & Reproduction

On RHEL 8 hosts behind strict egress rules, run `dnf makecache` and observe repeated download retries.

Root Cause Analysis

Common causes include DNS latency, blocked proxy paths, stale repo definitions, or unreachable mirrorlist endpoints.

Quick Triage

Check connectivity with `curl -I` to repo URLs and validate resolver health before changing repository settings.

Step-by-Step Diagnosis

Run `dnf repolist -v`, inspect `/etc/yum.repos.d/*.repo`, test `dig` and `ping` to mirror hosts, then review `journalctl -u NetworkManager`.

Illustrative mockup for rhel-8 — rhel8-dnf-timeout-1.webp
DNF timeout output in terminal — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Set valid `baseurl`, configure proxy if required, then run `dnf clean all && dnf makecache` and verify repository metadata downloads complete.

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-8 — rhel8-dnf-timeout-2.webp
Successful metadata refresh after fix — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Use internal Satellite or local mirror, pin a stable mirror, or schedule retries during low network contention windows.

Verification & Acceptance Criteria

`dnf updateinfo list` and `dnf upgrade –assumeno` should complete without timeout, and no repo errors should remain.

Rollback Plan

Restore previous `.repo` files from backup and revert proxy changes if package source validation fails.

Prevention & Hardening

Monitor repo latency, standardize repo templates via automation, and alert on repeated `dnf` failures in logs.

`Cannot prepare internal mirrorlist`, `All mirrors were tried`, and TLS handshake failures to CDN endpoints.

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

View all rhel-8 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

RHEL 8 package management docs, `dnf.conf(5)`, and enterprise proxy guidance for Red Hat repositories.

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.