私のブログがいつになっても証明書が更新されないので手動で実行すると、
久々に安定のletsencryptで怒られた。
1 2 3 4 5 6 7 8 9 10 11 12 |
$ /etc/letsencrypt/certbot-auto renew Error: couldn't get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt: Traceback (most recent call last): File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in <module> from certbot.main import main File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 5, in <module> import logging.handlers File "/usr/lib/python2.7/logging/__init__.py", line 26, in <module> import sys, os, time, cStringIO, traceback, warnings, weakref, collections File "/usr/lib/python2.7/weakref.py", line 14, in <module> from _weakref import ( ImportError: cannot import name _remove_dead_weakref |
上記のように証明書をrenewできない状態となっている。
(↓以前似たようなブログ書いてた)
[AWS][EC2][letsencrypt]File “/opt/eff.org/certbot/venv/bin/letsencrypt”, line 7, in
■対応
・certbot/pip upgrade
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# unset PYTHON_INSTALL_LAYOUT # pip install --upgrade certbot Downloading https://files.pythonhosted.org/packages/b0/02/1d24ef7ec8cc9e898d4543423a8e56abef4c21fd871d04d864d78d34cb56/certbot-0.27.1-py2.py3-none-any.whl (302kB) 100% |████████████████████████████████| 307kB 3.3MB/s Collecting pyrfc3339 (from certbot) Downloading https://files.pythonhosted.org/packages/c1/7a/725f5c16756ec6211b1e7eeac09f469084595513917ea069bc023c40a5e2/pyRFC3339-1.1-py2.py3-none-any.whl ~省略~ # pip install --upgrade pip Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB) 100% |████████████████████████████████| 1.3MB 933kB/s Installing collected packages: pip Found existing installation: pip 9.0.1 ~省略~ |
・ rm -rf /opt/eff.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ rm -rf /opt/eff.org removed '/opt/eff.org/certbot/venv/include/python2.7' removed directory '/opt/eff.org/certbot/venv/include' removed '/opt/eff.org/certbot/venv/bin/python2.7' removed '/opt/eff.org/certbot/venv/bin/pbr' removed '/opt/eff.org/certbot/venv/bin/activate' removed '/opt/eff.org/certbot/venv/bin/pip2.7' removed '/opt/eff.org/certbot/venv/bin/python' removed '/opt/eff.org/certbot/venv/bin/easy_install' removed '/opt/eff.org/certbot/venv/bin/activate.csh' removed '/opt/eff.org/certbot/venv/bin/python2' removed '/opt/eff.org/certbot/venv/bin/certbot' removed '/opt/eff.org/certbot/venv/bin/unit2' removed '/opt/eff.org/certbot/venv/bin/jws' removed '/opt/eff.org/certbot/venv/bin/activate.fish' removed '/opt/eff.org/certbot/venv/bin/letsencrypt' removed '/opt/eff.org/certbot/venv/bin/pip' removed '/opt/eff.org/certbot/venv/bin/pip2' ~省略~ |
・certbot-auto renew
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# sudo systemctl stop h2o ; /etc/letsencrypt/certbot-auto renew ; sudo systemctl start h2o Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/adachin.me.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cert not yet due for renewal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/adachin.server-on.net.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cert is due for renewal, auto-renewing... Plugins selected: Authenticator standalone, Installer None Renewing an existing certificate Performing the following challenges: tls-sni-01 challenge for adachin.server-on.net Waiting for verification... Cleaning up challenges - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - new certificate deployed without reload, fullchain is /etc/letsencrypt/live/adachin.server-on.net/fullchain.pem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /etc/letsencrypt/renewal/blog.adachin.me.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cert is due for renewal, auto-renewing... Plugins selected: Authenticator standalone, Installer None Renewing an existing certificate Performing the following challenges: tls-sni-01 challenge for blog.adachin.me Waiting for verification... Cleaning up challenges - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - new certificate deployed without reload, fullchain is /etc/letsencrypt/live/blog.adachin.me/fullchain.pem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The following certs are not due for renewal yet: /etc/letsencrypt/live/adachin.me/fullchain.pem expires on 2018-11-04 (skipped) Congratulations, all renewals succeeded. The following certs have been renewed: /etc/letsencrypt/live/adachin.server-on.net/fullchain.pem (success) /etc/letsencrypt/live/blog.adachin.me/fullchain.pem (success) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
■まとめ
# rm -rf /opt/eff.orgだけでもいいぽい。
0件のコメント