Let's Encrypt renew failing recently


#1

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.

My domain is: app.vivahr.com

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


#2

Hi,

Can you run the following command and share the output?(to install pyOpenssl)
pip install pyOpenSSL

Thank you.


#3

pip install pyOpenSSL

Requirement already satisfied: pyOpenSSL in /usr/lib64/python2.7/dist-packages
Requirement already satisfied: cryptography>=2.1.4 in /usr/local/lib64/python2.7/site-packages (from pyOpenSSL)
Requirement already satisfied: six>=1.5.2 in /usr/local/lib/python2.7/site-packages (from pyOpenSSL)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/lib/python2.7/dist-packages (from cryptography>=2.1.4->pyOpenSSL)
Requirement already satisfied: enum34; python_version < “3” in /usr/lib/python2.7/dist-packages (from cryptography>=2.1.4->pyOpenSSL)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != “PyPy” in /usr/lib64/python2.7/dist-packages (from cryptography>=2.1.4->pyOpenSSL)
Requirement already satisfied: ipaddress; python_version < “3” in /usr/lib/python2.7/dist-packages (from cryptography>=2.1.4->pyOpenSSL)
Requirement already satisfied: idna>=2.1 in /usr/lib/python2.7/dist-packages (from cryptography>=2.1.4->pyOpenSSL)
Requirement already satisfied: pycparser in /usr/lib/python2.7/dist-packages (from cffi>=1.7; platform_python_implementation != “PyPy”->cryptography>=2.1.4->pyOpenSSL)


#4

Does anyone have any idea how to fix this?


#5

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.


#6

actually I was getting nearly the same output several month ago. The only solution I know is recreate the server.


#7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.