LoginSignup
0
1

More than 1 year has passed since last update.

RHEL8のdnfコマンドで Cannot download repomd.xml エラー

Posted at

概要

仮想マシン上のRHEL8で、パッケージマネージャdnfを実行すると以下のエラーが発生することがある。

# dnf install -y iproute-tc
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                                                                                                                                                     431  B/s | 364  B     00:00
Errors during downloading metadata for repository 'rhel-8-for-x86_64-appstream-rpms':
  - Status code: 403 for https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/repodata/repomd.xml (IP: 10.210.6.254)
エラー: repo 'rhel-8-for-x86_64-appstream-rpms' のメタデータのダウンロードに失敗しました : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

どうもスナップショットの取得・リストアを行う際に発生する模様。
https://stackoverflow.com/questions/59857492/dnf-broken-all-mirrors-were-tried
にあるように、/etc/yum.repos.d/を掃除するなどしたが、解決しない。

環境

  • ESXi 6.5上の仮想マシン
  • RedHat Enterprise Linux 8.4 (Ootpa)

対策

subscription-managerでマシンを再登録後、サブスクリプションを割り当て直す。

# subscription-manager register --force
登録の解除中: subscription.rhsm.redhat.com:443/subscription
UUID が XXX のシステムの登録は解除されました
ローカルデータがすべて削除されました
登録中: subscription.rhsm.redhat.com:443/subscription
ユーザー名: hoge
パスワード:
このシステムは、次の ID で登録されました: XXXX
登録したシステム名: fuga

# subscription-manager subscribe
インストール済み製品の現在の状態:
製品名: Red Hat Enterprise Linux for x86_64
状態:   サブスクライブ済み

dnf再実行

dnf install -y iproute-tc
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                                                                                                                                                        5.6 MB/s |  37 MB     00:06
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                                                                                                                                                      17 MB/s |  32 MB     00:01
依存関係が解決しました。
=============================================================================================================================================================================================================================================
 パッケージ                                           アーキテクチャー                                 バージョン                                              リポジトリー                                                            サイズ
=============================================================================================================================================================================================================================================
インストール:
 iproute-tc                                           x86_64                                           5.9.0-4.el8                                             rhel-8-for-x86_64-baseos-rpms                                           459 k

トランザクションの概要
(略)

インストール済み:
  iproute-tc-5.9.0-4.el8.x86_64

完了しました!

どうもスナップショットのリストアでデータが不整合になっている感じ?
この辺はCentOSの方が楽で良いかも。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1