kusanagiでLet’s Encryptのupdate certに失敗するとき…

なんかlets encryptのcronアップデートに失敗している。仕方なく毎月手動で更新していたんだが、面倒くさい! ちゃんと直すことにした。

[dacelo@space ]$ sudo /usr/bin/kusanagi update cert

Traceback (most recent call last):
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/renewal.py", line 64, in _reconstitute
renewal_candidate = storage.RenewableCert(full_path, config)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/storage.py", line 446, in __init__
"file reference".format(self.configfile))
CertStorageError: renewal config file {} is missing a required file reference
Renewal configuration file /etc/letsencrypt/renewal/hogehoge.net.conf is broken. Skipping.
Challenge failed for domain fugafuga.net
Attempting to renew cert (fugafuga.net) from /etc/letsencrypt/renewal/fugafuga.net.conf produced an unexpected error: Some challenges have failed.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/fugafuga.net/fullchain.pem (failure)
1 renew failure(s), 1 parse failure(s)
There is no service named "boeboe.net_httpd_ssl"
There is no service named "boeboe.net_nginx_ssl"
失敗しました。

まずは最後の、「There is no service named “boeboe.net_httpd_ssl”」がおかしい。
これは、プライム・ストラテジー社の宮崎氏によると、monitがうまく動作していないのが原因らしいので、再起動しておく。
sudo systemctl restart monit

広告

すると…

[dacelo@space ]$ sudo /usr/bin/kusanagi update cert
Traceback (most recent call last):
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/renewal.py", line 64, in _reconstitute
renewal_candidate = storage.RenewableCert(full_path, config)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/storage.py", line 446, in __init__
"file reference".format(self.configfile))
CertStorageError: renewal config file {} is missing a required file reference
Renewal configuration file /etc/letsencrypt/renewal/hogehoge.net.conf is broken. Skipping.
Challenge failed for domain fugafuga.net
Attempting to renew cert (fugafuga.net) from /etc/letsencrypt/renewal/fugafuga.net.conf produced an unexpected error: Some challenges have failed.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/fugafuga.net/fullchain.pem (failure)
1 renew failure(s), 1 parse failure(s)
完了しました。

やった!完了した!

まあでもcertに失敗しているのは相変わらずなんだけど、こっちの方はだいたい状態は分かっている。
hogehoge.netの方は、confファイルが壊れてゼロバイトになっていたので、正常なものをコピーして手動で補填。
fugafuga.netの方は、このドメインをこのサーバで運用するのを辞めた(Aレコードがもうこのサーバではない)ので、チャレンジが失敗しているので、confファイルをリネームして読み込まれないようにした。

すると…

[dacelo@space ]$ sudo /usr/bin/kusanagi update cert
完了しました。

OK!
ああよかった。これで月初のCronにすべて任せることができる。

参考ページ

kusanagi nginx 失敗しました。

About: dacelo


3 thoughts on “kusanagiでLet’s Encryptのupdate certに失敗するとき…”

Leave a Reply

Your email address will not be published. Required fields are marked *