Let’s Encryptの更新で失敗
戻る
公開日:2023/3/12

何回かやっている、Let’s Encryptの更新ですが、また一つ手間取ったので、備忘録のため記録を残します。
環境は以下の通り。さくらVPSを利用しています。
WordPress | 5.8.1 |
CentOS | 7.8 |
certbot | 1.11.0 |
まずは更新コマンドでチャレンジ。–dry-runオプションで更新は実行せずにコマンド結果が得られます。
# cerbot renew [--dry-run]エラーになりました。
# certbot renew
(省略)
Failed to renew certificate fuuu.work-0001 with error: Problem binding to port 80: Could not bind to IPv4 or IPv6.こちらはポート80をnginxで使用していたので想定通り。
再チャレンジしましたが、以下のエラーが表示されました。
Failed to renew certificate (ドメイン) with error: Some challenges have failed.表示されていたドメインは以前削除したドメインでした。
なので、証明書の失効・削除をします。
# certbot revoke --cert-path=/etc/letsencrypt/live/(削除したドメイン)/fullchain.pem以下のエラーが表示されました。。
An unexpected error occurred:
The client lacks sufficient authorization :: Certificate is expired削除したドメインの証明書が既に失効していた為。
そのため、失効はさせずに、削除だけします。
# certbot delete --cert-name (削除したドメイン)他に削除するドメインがないか、以下のコマンドで確認しながら作業しました。
# certbot certificates削除していたら、以下のエラーが表示されました。
No certificate found with name (削除したドメイン) (expected /etc/letsencrypt/renewal/(削除したドメイン).conf).登録の仕方が良くなかったのか、「certbot certificates」で確認すると以下のようになっていたので、生きているドメインのfuuu.workの更新ができず。一度削除して、証明書を個別に生成しなおしました。
Certificate Name: fuuu.work-0002
Serial Number: 4b******************
Key Type: RSA
Domains: fuuu.work (削除したドメイン)
Expiry Date: 2023-03-20 00:02:42+00:00 (VALID: 12 days)
Certificate Path: /etc/letsencrypt/live/fuuu.work-0002/fullchain.pem
Private Key Path: /etc/letsencrypt/live/fuuu.work-0002/privkey.pem# certbot delete --cert-name fuuu.workSSL証明書を生成しなおして完了です。
# certbot certonly --standalone --expand -d fuuu.work -m (メールアドレス) --agree-tos -n戻る
