SSL certificate fail to update

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. |, so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:
sudo certbot renew

It produced this output:
Processing /etc/letsencrypt/renewal/

Attempting to renew cert ( from /etc/letsencrypt/renewal/ produced an unexpected error: module 'lib' has no attribute 'X509_get_notAfter'. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/ (failure)

All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/ (failure)

1 renew failure(s), 0 parse failure(s)

My web server is (include version):

The operating system my web server runs on is (include version):ubuntu 20.0

My hosting provider, if applicable, is: Own server

I can login to a root shell on my machine (yes or no, or I don't know): I don't know

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):NA

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 0.40.0 (I tried to update but is said to be latest version)

additional information:
a) I read one thread which is similar to my issue and it is said he add [[webroot_map]] to /etc/letsencrypt/renewal/ but it seem not helping for mine:

renew_before_expiry = 30 days

version = 0.40.0
archive_dir = /etc/letsencrypt/archive/
cert = /etc/letsencrypt/live/
privkey = /etc/letsencrypt/live/
chain = /etc/letsencrypt/live/
fullchain = /etc/letsencrypt/live/

Options used in the renewal process

account = 1ae17a4380d7dc0b0aaff604e5694afa
authenticator = nginx
installer = nginx
server =
[[webroot_map]] = /var/www/html = /var/www/html

b) I saw there is also a suggestion some version have some bug and I try to update it using sudo apt-get update and sudo apt-get install --only-upgrade certbot but is said to be of latest version.

Welcome @adiputra

Your certbot install is faulty. The best way forward is for you to install certbot with snap. Ubuntu 20 supports that easily.




Thanks Mike, it works!
I did see the snapd things but reason why I don't want to do it initially is because I don't know what will happen with installing via snapd. To people who face similar issue just uninstall the current package using sudo apt remove cerbot and reinstall using snapd.


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