Affected versions: CentOS Stream 9

📖 ~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 fails intermittently when refreshing repository metadata, delaying patching.

Environment & Reproduction

Hosts pulling from upstream CentOS Stream 9 mirrors via NAT or slow links.

cat /etc/os-release
uname -r
rpm -qa | grep 

Root Cause Analysis

DNS latency, stale mirror cache, or upstream mirror returning HTTP 503.

Quick Triage

Confirm package, network, SELinux and firewall state.

dnf repolist -v
systemctl status NetworkManager
getenforce

Step-by-Step Diagnosis

Drill into package/dnf-metadata state and recent journal entries to isolate the failure.

curl -Iv https://mirror.stream.centos.org
dnf -v makecache 2>&1 | tail -n 80
Illustrative mockup for centos-stream-9 — cs9-b02-p026-diag
Diagnosis console for DNF metadata refresh timeouts on CentOS Stream 9 — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Apply the standard remediation for package/dnf-metadata on CentOS Stream 9.

Still having issues? Our Managed IT Services team can diagnose and resolve this for you. Get in touch for a free consultation.

sudo dnf clean all
sudo dnf makecache
sudo systemctl restart NetworkManager
Illustrative mockup for centos-stream-9 — cs9-b02-p026-fix
Remediation output for DNF metadata refresh timeouts on CentOS Stream 9 — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Switch to a closer mirror or use a local Pulp mirror.

Verification & Acceptance Criteria

Validate the fix with positive functional checks before closing.

dnf check-update
dnf repolist

Rollback Plan

Revert to the previous known-good configuration if the fix regresses.

cp /root/backup/*.repo /etc/yum.repos.d/
dnf clean all

Prevention & Hardening

Codify the fix in configuration management and add monitoring.

Automate patch management and compliance across your fleet with our DevOps services.

dnf -q repolist
journalctl -u dnf* -n 50 --no-pager

GPG key verification failures and mirrorlist DNS issues.

Related tutorial: View the step-by-step tutorial for centos-stream-9.

View all centos-stream-9 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

CentOS Stream documentation and DNF user guide.

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.