wget でタイムアウト設定が有効ではないため katello-installer が失敗する
Environment
- Red Hat Enterprise Linux 6
- Red Hat Satellite 6.1
Issue
- Satellite 6.1 のインストール時に、以下のエラーが
katello-installerによって報告されます。
/usr/bin/wget --timeout=30 --tries=40 --wait=20 --retry-connrefused -qO- http://localhost:8080/candlepin/admin/init >/var/log/candlepin/cpinit.log 2>&1 && touch /var/lib/candlepin/cpinit_done returned 4 instead of one of [0]
/Stage[main]/Candlepin::Service/Exec[cpinit]/returns: change from notrun to 0 failed:/usr/bin/wget --timeout=30 --tries=40 --wait=20 --retry-connrefused -qO- http://localhost:8080/candlepin/admin/init >/var/log/candlepin/cpinit.log 2>&1 && touch /var/lib/candlepin/cpinit_done returned 4 instead of one of [0]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[satellite6.server.example.com]:Failed to call refresh:Could not load data from https://satellite6.server.example.com
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[satellite6.server.example.com]:Could not load data from https://satellite6.server.example.com
Resolution
- (
IPv6が無効な場合)IPv6localhostエントリーを/etc/hostsから削除するとこの問題が解決します。/etc/hostsから "::1 localhost localhost.localdomain localhost6 localhost6.localdomain6" (など) を無効化または削除します。
Root Cause
- システムが
IPv6を無効にすると、/etc/hostsのIPv6にlocalhostエントリーがあります。これにより、有効期限が切れるタイムアウトを待つ代わりにプロトコルエラーが発生しているため、wgetがすぐに失敗します。これは、tomcatweb サービスを完全に起動するのを待つために追加されました。
Diagnostic Steps
katello-installerが失敗して以下のエラーメッセージが表示されます。
/usr/bin/wget --timeout=30 --tries=40 --wait=20 --retry-connrefused -qO- http://localhost:8080/candlepin/admin/init >/var/log/candlepin/cpinit.log 2>&1 && touch /var/lib/candlepin/cpinit_done returned 4 instead of one of [0]
/Stage[main]/Candlepin::Service/Exec[cpinit]/returns: change from notrun to 0 failed:/usr/bin/wget --timeout=30 --tries=40 --wait=20 --retry-connrefused -qO- http://localhost:8080/candlepin/admin/init >/var/log/candlepin/cpinit.log 2>&1 && touch /var/lib/candlepin/cpinit_done returned 4 instead of one of [0]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[satellite6.server.example.com]:Failed to call refresh:Could not load data from https://satellite6.server.example.com
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[satellite6.server.example.com]:Could not load data from https://satellite6.server.example.com
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