Certbot has stopped working

I installed certbot about three years ago and it has been updating my LetsEncrypt certificate up until August/September 2022. Since then it refuses to run at all. My certificate is about to run out and I'm getting desperate!

My domain is: membership.thedonstrust.org

I ran this command: certbot any
It produced this output:
root@wags_server_2:~# certbot renew
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in
load_entry_point('certbot==0.31.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2631, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2291, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2297, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 18, in
from certbot import account
File "/usr/lib/python3/dist-packages/certbot/account.py", line 18, in
from acme import messages
File "/usr/lib/python3/dist-packages/acme/messages.py", line 11, in
from acme import challenges
File "/usr/lib/python3/dist-packages/acme/challenges.py", line 12, in
import requests
ImportError: No module named 'requests'

My web server is (include version): Apache/2.4.18 (Ubuntu)

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

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
any certbot command gives the error above. However,
root@wags_server_2:~# apt-cache policy certbot | grep Installed
Installed: 0.31.0-2~deb10u1+ubuntu16.04.1+certbot+3

1 Like

Welcome to the community @stembo

Some other volunteers may know what happened and might have ideas to fix that. It looks to me like something changed in your python packages but I am not expert on that.

My suggestion is to upgrade your very old certbot version to the snap version. The instructions for Ubuntu 16 with Apache are below:

4 Likes

@MikeMcQ is right on target: Ubuntu 16 supports snap.
I would also recommend that you replace that version of certbot with the latest snap version.

4 Likes

Thank you both for your suggestion.
When trying to use snap, I discovered it wasn't installed already (as according to the documentation it should have been) so I tried to install it with sudo apt install snapd.
This got as far as Setting up snapd and then reported:
Setting up snapd (2.48.3) ...
snapd.failure.service is a disabled or a static unit, not starting it.
snapd.snap-repair.service is a disabled or a static unit, not starting it.

I then tried to install snapd myself:
root@wags_server_2:/home/admin# sudo snap install snapd
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
/tmp/sanity-mountpoint-950726094: mount failed: Unknown error -1

I suspect my VPS provider (34sp.com) has disabled something so I am stuck in a rabbit hole
If anyone can help with this or has an alternative fix to my original problem, I'd be grateful to hear from you.

hmm...
I'd try an alternate ACME client.
Like: acme.sh

Until you can get snap installed correctly.
For that, I suggest using an Ubuntu forum.

4 Likes

Like Rudy says you might try something like acme.sh

Or, try the Snapcraft docs or forum

4 Likes

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