同期のトラブルシューティング
同期はさまざまな理由で失敗する可能性があります。 接続問題に関する詳細情報を得るには、次のコマンドを実行してください。
export URLGRABBER_DEBUG=DEBUG spacewalk-repo-sync -c <channelname> <options> > /var/log/spacewalk-repo-sync-$(date +%F-%R).log 2>&1
Zypperによって作成されたログは、`/var/log/zypper.log`でも確認できます。
- GPGキーの不一致
-
SUSE Multi-Linux Managerは自動的にサードパーティのGPGキーを信頼しません。 パッケージの同期が失敗した場合、それは信頼されていないGPGキーが原因である可能性があります。 これが該当するかどうかを確認するには、`/var/log/rhn/reposync`を開き、次のようなエラーを探してください。
['/usr/bin/spacewalk-repo-sync', '--channel', 'sle-12-sp1-ga-desktop- nvidia-driver-x86_64', '--type', 'yum', '--non-interactive'] RepoMDError: Cannot access repository. Maybe repository GPG keys are not imported
問題を解決するには、GPGキーをSUSE Multi-Linux Managerにインポートする必要があります。 GPGキーのインポートに関する詳細は、リポジトリメタデータを参照してください。
- `spacewalk-repo-sync`からのGPGキーを削除する
-
リポジトリのGPGキーが`spacewalk-repo-sync`を使用して手動でインポートされ、このキーが不要になった場合(たとえば、キーが侵害された場合やテスト目的専用で使用された場合)、`spacewalk-repo-sync`によって使用されるzypper RPMデータベースから、次のコマンドで削除できます。
rpm --dbpath=/var/lib/spacewalk/reposync/root/var/lib/rpm/ -e gpg-pubkey-*
ここで、`gpg-pubkey-*`は削除するGPGキーの名前です。
- GPGキーの更新
-
GPGキーを更新する場合は、まず古いキーを削除してから、新しいキーを生成してインポートします。
- チェックサムの不一致
-
チェックサムが失敗すると、`/var/log/rhn/reposync/*.log`のログファイルに次のようなエラーが表示される場合があります。
Repo Sync Errors: (50, u'checksums did not match 326a904c2fbd7a0e20033c87fc84ebba6b24d937 vs afd8c60d7908b2b0e2d95ad0b333920aea9892eb', 'Invalid information uploaded to the server') The package microcode_ctl-1.17-102.57.62.1.x86_64 which is referenced by patch microcode_ctl-8413 was not found in the database. This patch has been skipped.
`-Y`オプションを使用して、コマンドラインプロンプトから同期を実行することで、このエラーを解決できます。
spacewalk-repo-sync --channel <channelname> -Y
このオプションはローカルにキャッシュされたチェックサムに依存するのではなく、同期前にリポジトリデータを検証します。
- 接続タイムアウト
-
ダウンロードが次のエラーでタイムアウトする場合:
28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 300 seconds
このエラーは、`/etc/rhn/rhn.conf`で`reposync_timeout`および`reposync_minrate`の設定値を指定することで解決できます。 デフォルトでは、300秒間に1000バイト未満が転送されると、ダウンロードは中止されます。 `reposync_minrate`で1秒あたりのバイト数を、`reposync_timeout`で待機する秒数を調整できます。
- reposyncの実行中にキーを手動で信頼する
-
`reposync`の実行時に、GPGキーを手動で承認する必要がある場合があります。 例:
# spacewalk-repo-sync -c nvidia-compute-sle-15-x86_64-we-sp3 17:07:40 ====================================== 17:07:40 | Channel: nvidia-compute-sle-15-x86_64-we-sp3 17:07:40 ====================================== 17:07:40 Sync of channel started. New repository or package signing key received: Repository: nvidia-compute-sle-15-x86_64-we-sp3 Key Fingerprint: 610C 7B14 E068 A878 070D A4E9 9CD0 A493 D42D 0685 Key Name: cudatools <cudatools@nvidia.com> Key Algorithm: RSA 4096 Key Created: Thu Apr 14 16:04:01 2022 Key Expires: (does not expire) Rpm Name: gpg-pubkey-d42d0685-62589a51 Note: Signing data enables the recipient to verify that no modifications occurred after the data were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system and in extreme cases even to a system compromise. Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If you are not sure whether the presented key is authentic, ask the repository provider or check their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they are using. Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r):