Renewal issues with certificates

Please fill out the fields below so we can help you better.

My domain is: torqcart.net

I ran this command: sudo ./certbot-auto renew --pre-hook “service apache2 stop” --post-hook “service apache2 start”

It produced this output:
Error: couldn’t get currently installed version for /home/ubuntu/.local/share/letsencrypt/bin/letsencrypt:
Traceback (most recent call last):
File “/home/ubuntu/.local/share/letsencrypt/bin/letsencrypt”, line 7, in
from certbot.main import main
File “/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/main.py”, line 9, in
from acme import jose
File “/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/jose/init.py”, line 37, in
from acme.jose.interfaces import JSONDeSerializable
File “/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/jose/interfaces.py”, line 9, in
from acme.jose import util
File “/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/jose/util.py”, line 4, in
from cryptography.hazmat.primitives.asymmetric import rsa
File “/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py”, line 14, in
from cryptography.hazmat.backends.interfaces import RSABackend
File “/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/backends/init.py”, line 7, in
import pkg_resources
File “/home/ubuntu/.local/share/letsencrypt/local/lib/python2.7/site-packages/pkg_resources/init.py”, line 36, in
import plistlib
File “/usr/lib/python2.7/plistlib.py”, line 62, in
import datetime
ImportError: No module named datetime

My web server is (include version): Apache2

The operating system my web server runs on is (include version): Ubuntu 16 (Upgraded from 14)

My hosting provider, if applicable, is:

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

Your python installation is broken, or possibly the virtualenv certbot creates.

What happens when you run:

python -c 'import datetime; print datetime.datetime.now()'

Do you get the ImportError quoted above, or does it print the date and time?

Out put that I received is 2017-08-28 16:06:55.374063

So your python is fine. Something weird happened with certbot’s virtualenv, possibly when you upgraded, which isn’t so bad.

If you delete or move certbot’s files somewhere else, e.g.:

mv /home/ubuntu/.local/share/letsencrypt /home/ubuntu/.local/share/letsencrypt.bak

and rerun certbot-auto it will reinstall everything, hopefully in working order.

It worked… thanks.

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