let’s encrypt更新時にエラー(Warning)が出ていた(2022年5月)

この記事について

環境CentOS6.8 + certbot-auto
目的cron更新時のメールに出ていたWARNINGの原因を調べる
結果Python 3.5+ が入らないのが原因。CentOS6.8では解決できず、さくらのSSLに乗り換えた(別記事)

つまずきポイント要約

  • WARNINGが出ていても証明書自体は更新されていた
  • CentOS6.8 の extras には centos-release-scl の必要バージョン(7-4)が提供されていない

事象

let’s encrypt を cron で更新した際に飛んでくるメールにエラー(WARNING)が記載されていた。

WARNING: couldn't find Python 3.5+ to check for updates.
Skipping upgrade because new OS dependencies may need to be installed.

To upgrade to a newer version, please run this script again manually so you can
approve changes or with --non-interactive on the command line to automatically
install any required packages.
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/hyogen.info.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not yet due for renewal

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The following certs are not due for renewal yet:
  /etc/letsencrypt/live/hyogen.info/fullchain.pem expires on 2022-08-06 (skipped)
No renewals were attempted.
No hooks were run.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

調査

Python 3.5+ が見つからないとのこと。
いつからエラーが出ていたか過去のメールを調べてみたら2020年1月の時点でエラーが確認できた。
一年五か月前からエラーが出てはいるが、証明書の有効期限は更新されている。

メールにしたがって manually(手動)で更新して見る。

/var/myshellscript/lets_encrypt_renew.sh

もしくは

# sudo /root/certbot-auto renew --post-hook "sudo service httpd restart"

centos-release-scl(10:7-4.el6.centos)と centos-release-scl-rh(2-4.el6.centos)がインストールできないとエラーが出る

===================================================
 パッケージ                                    アーキテクチャ                 バージョン                                  リポジトリー                    容量
===================================================
インストールしています:
 centos-release-scl                            noarch                         10:7-4.el6.centos                           extras                          12 k
依存性関連でのインストールをします。:
 centos-release-scl-rh                         noarch                         2-4.el6.centos                              extras                          12 k

トランザクションの要約
===================================================
インストール         2 パッケージ

総ダウンロード容量: 24 k
インストール済み容量: 39 k
パッケージをダウンロードしています:
301 Moved Permanently
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" 他のミラーを試します。 To address this issue please refer to the below knowledge base article
[Errno 14] yum fails with HTTP/HTTPS Error 404 - Red Hat Customer Portal
Abstract field is required.
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
301 Moved Permanently
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" 他のミラーを試します。 パッケージのダウンロードでエラー: 10:centos-release-scl-7-4.el6.centos.noarch: failure: Packages/centos-release-scl-7-4.el6.centos.noarch.rpm from extras: [Errno 256] No more mirrors to try. centos-release-scl-rh-2-4.el6.centos.noarch: failure: Packages/centos-release-scl-rh-2-4.el6.centos.noarch.rpm from extras: [Errno 256] No more mirrors to try. Could not enable SCL. Aborting bootstrap!

centos-release-scl と centos-release-scl-rh の該当バージョンがインストールされていないのか確認

 yum list installed | grep centos

該当なし。

インストールはできるのか確認。

yum list | grep centos

インストール可能な一覧には含まれている

centos-release-gluster7.noarch            1.0-1.el6.centos             extras   
centos-release-scl.noarch                 10:7-4.el6.centos            extras   
centos-release-scl-rh.noarch              2-4.el6.centos               extras   
centos-release-storage-common.noarch      1-2.el6.centos               extras   

しかしインストールはできない。

http://vault.centos.org/6.8/extras/x86_64/Packages/centos-release-scl-rh-2-4.el6.centos.noarch.rpm にブラウザでアクセスしてみると

centOS6.8 には centos-release-scl-7-3.el6.centos.noarch.rpm しか提供されていない。

centOS6.10 には 7-4 があった。

結論:CentOS6.8 ではパッケージが提供されておらずこれ以上どうにもならないので、後日 let’s encrypt からさくらのSSLに乗り換えた。

タイトルとURLをコピーしました