Translated message

A translation of this page exists in English.

Yum アップデートに失敗し 'Error:Cannot retrieve repository metadata (repomd.xml) for repository' が表示される

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Network Satellite または Proxy 5.4 以降

Issue

  • 以下のエラーで yum update に失敗します。
Error:Cannot retrieve repository metadata (repomd.xml) for repository:XXXX.Please verify its path and try again

Resolution

  • Satellite または Proxy サーバーに完全修飾ドメイン名 (FQDN) が設定されており、Apache が使用する SSL 証明書の CommonName (CN) が FQDN に設定されていることを確認してください。

    • 自己署名 Satellite 証明書の場合は CN フィールドの Issuer および Subject に FQDN が設定されており、その互いのフィールドで一致している必要があります。

      # grep CN /etc/httpd/conf/ssl.crt/server.crt
      Issuer:C=US, ST=North Carolina, O=Example Corp. Inc., OU=unit, CN=satellite.example.com
      Subject:C=US, ST=North Carolina, O=Example Corp. Inc., OU=unit, CN=satellite.example.com/emailAddress=admin@example.com
      
    • サードパーティの SSL 証明書の場合は、CN フィールドの Subject を FQDN にする必要があります。

      Subject:C=US, ST=North Carolina, O=Example Corp. Inc., OU=unit, CN=satellite.example.com/emailAddress=admin@example.com
      
  • また、ssl.conf 設定ファイルで指定しているファイルが正しいことを確認してください。

    # grep ^SSLCert /etc/httpd/conf.d/ssl.conf
    SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
    SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
    
  • クライアントシステムの /etc/sysconfig/rhn/up2date ファイルの serverURL が、以下のように Satellite または Proxy の FQDN を使用していることを確認します。

    serverURL=https://satellite.example.com/XMLRPC
    
  • http プロキシから RHN にシステムを接続する場合は、/etc/sysconfig/rhn/up2date を設定している http_proxy 情報が正しいことを確認してください。

    httpProxy=http_proxy_fqdn or ip_address:port
    
  • /etc/sysconfig/rhn/up2date の重複ファイルが存在する場合は、/etc/sysconfig/rhn/ から削除します。

  • yum の最新バージョンがインストールされていることを確認します。

# yum update yum
  • 上述の設定がすべて正しい場合は、以下のコマンドを使用してクライアントシステムのキャッシュを削除します。

    # rm -rf /var/cache/yum/*
    

Root Cause

  • SSL 設定が一致していません。
  • http プロキシとポート番号のエントリが一致していません。
  • Component
  • yum

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments