The certbot-auto renewal has been running fine, but one day, I noticed it was giving me this error.
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 9, in
line 16, in
ImportError: No module named interface
After trying different suggestions, I’ve found a solution that worked for me.
What I first did was remove the local cache:
sudo rm -rf /root/.local/share/letsencrypt/ sudo rm -rf /opt/eff.org/certbot/
Tried renewing with certbot-auto –debug renew after that and got the same error.
So I tried manually upgrading certbot:
unset PYTHON_INSTALL_LAYOUT /root/.local/share/letsencrypt/bin/pip install --upgrade certbot
After that, I ran the renewal command again: certbot-auto –debug renew, and it finally ran without any errors.
These were the only steps I took to resolve this issue on an Amazon Linux ec2 server with the latest updates.
You might need to restart httpd service if your certificate has been expired.