Error While executing bench setup lets-encrypt [site-name]

Hi All,
i’ve got problem while executing
sudo -H bench setup lets-encrypt [site name]

dev@ubuntuserver:~/frappe-bench$ sudo -H bench setup lets-encrypt
Running this will stop the nginx service temporarily causing your sites to go offline
Do you want to continue? [y/N]: Y

$ sudo systemctl stop nginx

$ /usr/local/bin/certbot --config /etc/letsencrypt/configs/ certonly
Traceback (most recent call last):
File “/usr/local/bin/certbot”, line 5, in
from certbot.main import main
File “/usr/local/lib/python3.10/dist-packages/certbot/”, line 6, in
from certbot._internal import main as internal_main
File “/usr/local/lib/python3.10/dist-packages/certbot/_internal/”, line 19, in
import josepy as jose
File “/usr/local/lib/python3.10/dist-packages/josepy/”, line 40, in
from josepy.json_util import (
File “/usr/local/lib/python3.10/dist-packages/josepy/”, line 14, in
from OpenSSL import crypto
File “/usr/lib/python3/dist-packages/OpenSSL/”, line 8, in
from OpenSSL import crypto, SSL
File “/usr/lib/python3/dist-packages/OpenSSL/”, line 3279, in
AttributeError: module ‘lib’ has no attribute ‘OpenSSL_add_all_algorithms’

$ sudo systemctl start nginx
There was a problem trying to setup SSL for your site
Setting Up cron job to Renew lets-encrypt every month

pip3 Package

cryptography 39.0.0
certbot 2.2.0

anyone can help ??


Installing SSL Certificate
sudo service nginx stop
sudo apt install snapd
sudo snap install core; sudo snap refresh core
sudo apt-get remove certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx
sudo certbot certonly --nginx
sudo certbot renew --dry-run
sudo service nginx restart

This Works for me.

thanks,… i try and report soon,… :smiley:

1 Like