I installed let’s encrypt several months ago and set a cron to renew, which has been working fine, until recently. Today I got an email saying my certificate was going to expire in 20 days. So I tried running the command that the cron job runs to renew the certificate and I get errors.
I ran this command: sudo /opt/letsencrypt/letsencrypt-auto --debug
It produced this output:
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
from certbot.main import main
File “/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py”, line 10, in
import josepy as jose
File “/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/init.py”, line 41, in
from josepy.interfaces import JSONDeSerializable
File “/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/interfaces.py”, line 8, in
from josepy import errors, util
File “/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/util.py”, line 4, in
import OpenSSL
ImportError: No module named OpenSSL
My web server is (include version): AWS (don’t know where to find server version)
The operating system my web server runs on is (include version): Linux ip-172-31-21-130 4.9.77-31.58.amzn1.x86_64 #1 SMP Thu Jan 18 22:15:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
My hosting provider, if applicable, is: AWS
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no
Never figured out why this was happening, but I created a new instance and installed ubuntu 16.04 LTS and now Let’s Encrypt works much better and easier to set up.