LoginSignup
2
0

More than 3 years have passed since last update.

Let's Encryptの自動更新で失敗したときの対応方法

Last updated at Posted at 2020-08-03

Let's Encryptの自動更新で失敗したときの対応方法

更新期限ぎりぎりで更新したからなのか、パッケージを色々とアップデートしてしまったからなのか
Let's EncryptでSSL証明書の更新を行おうとしたらエラーがでたのでその対応方法のメモです。

エラー内容

certbot renew で更新かけた際に下記のエラーが出ました。

# certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/【ドメイン名】.cnf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert is due for renewal, auto-renewing...
Could not choose appropriate plugin: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.',)
Attempting to renew cert (【ドメイン名】) from /etc/letsencrypt/renewal/【ドメイン名】.cnf produced an unexpected error: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.',). Skipping.
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/【ドメイン名】/fullchain.pem (failure)

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

All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/【ドメイン名】/fullchain.pem (failure)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 renew failure(s), 0 parse failure(s)

対応方法

仕方ないので、ググった結果、証明書の初回作成時と同様に certbot certonly を実行するしかないみたいでした。

certbot certonly --manual -d 【ドメイン名】

ググると 証明書の更新は cron で仕掛けて自動化とかの記事を読み見ますが
個人的に cron って運用に向いてないので、ansible のプレイリスト作って、
AWXとかで自動化したいなと思ってます。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0