RHN を登録すると、"Your certificate is expired" エラーが返ります

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5.4以前(RHEL5.4も含んでいる)
  • RHN Classic または RHN Satellite

Issue

  • システムを RHN に登録することができません。
  • rhn_register コマンドで Red Hat Network に登録しようとするとエラーが返ります。
An error has occurred:The certificate is expired.Please ensure you have the correct certificate and your system time is correct.See /var/log/up2date for more information

/var/log/up2date ファイルには、以下のようなメッセージが表示されます。

up2date_client.up2dateErrors.SSLCertificateVerifyFailedError:The certificate is expired.Please ensure you have the correct certificate and your system time is correct.

Resolution

診断手順セクションに従ってトラブルシュートを実施してください。

その後も Red Hat Network に登録できない場合はケースをオープンして、Red Hat Global Support Services にご連絡ください。

Diagnostic Steps

  • force による登録を試してみてください。
rhnreg_ks --force --serverUrl https://xmlrpc.rhn.redhat.com/XMLRPC

Satellite に登録する場合は、"xmlrpc.rhn.redhat.com" の代わりにお客様の Satellite FQDN を使用することができます。

  • "date" コマンドを使用して、システム時間が正しいかどうかを確認してください。

  • /etc/sysconfig/rhn/up2date ファイルに SSL 証明書を定義したことを確認します。

# grep sslCACert /etc/sysconfig/rhn/up2date
sslCACert=/usr/share/rhn/RHNS-CA-CERT

Satellite に登録しようとしている場合は、証明書のパスが異なる場合があります。

  • この SSL 証明書ファイルがシステムに存在していることを確認します。
# ls -l /usr/share/rhn/RHNS-CA-CERT
-rw-r--r-- 1 root root 8865 MMM DD YYY /usr/share/rhn/RHNS-CA-CERT
  • 上のアクセス権が "-rw-r--r-- ではない場合は、以下のように設定します。
chmod 644 /usr/share/rhn/RHNS-CA-CERT
  • それを所有する rhn-client-tools パッケージに記載されている認証ファイルのチェックサムを確認します。
# rpm -Vv rhn-client-tools | grep CERT
.........    /usr/share/rhn/RHNS-CA-CERT

パッケージをインストールしたあとに md5sum を変更した場合は、出力結果に 5 と表示されます。

# rpm -Vv rhn-client-tools | grep CERT
..5......    /usr/share/rhn/RHNS-CA-CERT

この場合は証明書が破損しているため、以下のように RPM を再度ダウンロードして再インストールする必要があります。

  • /usr/share/rhn/RHNS-CA-CERT の "Not After" 日を確認してください。
# grep After /usr/share/rhn/RHNS-CA-CERT
            Not After :Aug 26 02:10:55 2013 GMT
            Not After :Feb 24 21:07:08 2020 GMT

rpm -Uvh rhn-client-tools-*.noarch.rpm rhn-setup-gnome-*.noarch.rpm rhn-setup-*.noarch.rpm rhn-check-*.noarch.rpm コマンドを使用して関連ファイルを更新します。

  • ファイアウォールまたはプロキシサーバーを使用してシステムをインターネットに接続する場合は、ポート 80 および 443 が RHN 接続を許可していることを確認してください。詳細については、以下を参照してください。

How do I configure my firewall so that I can access the Red Hat Update Agent (up2date/yum) and Red Hat Network (RHN)?
https://access.redhat.com/knowledge/node/11214

  • 必要な RHN Classic ポートに接続していることをテストします。
# telnet xmlrpc.rhn.redhat.com 80
# telnet xmlrpc.rhn.redhat.com 443

telnet がインストールされていない場合は、ホスト名を curl または wget して HTTP が接続することを確認する必要があります。

ここで、Satellite FQDN (satellite.example.com) を代わりに使用することができます。

  • SSL を無効にして、HTTP が接続できることをテストします。

/etc/sysconfig/rhn/up2date ファイルを編集してオプションを変更します。

serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC

以下のように変更してください。

serverURL=http://xmlrpc.rhn.redhat.com/XMLRPC

そして、以下を追加します。

nosslforPackages=1

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