Cannot update Let's Encrypt certificate for site

Hello,

Command “ dpkg -l '*certbot*' ” outputs:

||/ Name Version Architecture Description
++±==============================================-============================-============================-==================================================================================================
ii certbot 0.21.1-1+ubuntu16.04.1+certb all automatically configure HTTPS using Let’s Encrypt
un python-certbot-apache (no description available)
un python-certbot-doc (no description available)
ii python-certbot-nginx 0.25.0-2+ubuntu16.04.1+certb all transitional dummy package
un python-certbot-nginx-doc (no description available)
ii python3-certbot 0.21.1-1+ubuntu16.04.1+certb all main library for certbot
un python3-certbot-apache (no description available)
ii python3-certbot-nginx 0.21.1-1+ubuntu16.04.1+certb all Nginx plugin for Certbot

When checking if “/usr/bin/certbot” exists, it’s not there however “ls -la /usr/bin/letsencrypt” shows a symbolic link to certbot (/usr/bin/letsencrypt -> certbot).

“echo $PATH” shows that ‘/usr/bin’ is in my path.

That’s weird. :confused:

For one thing, it’s weird that Certbot is two different old versions. The current version in the PPA is 0.26.1.

For another thing, it’s weird that /usr/bin/certbot is missing. It’s (in the current version, and probably in 0.21.1) part of the certbot package, which you have installed.

Do you have any idea what’s happened to your system?

What happens of you run sudo apt update and sudo apt full-upgrade?

I know weird.

From my knowledge, nothing strange happened to the system.

I’m not sure I want to ‘apt full-upgrade’…

The log files are not showing what exactly broke or where it went wrong (at least in my observation).

It’s looking more and more like I’ll have perhaps better luck reinstalling certbot / letsencrypt?

Clueless at the moment.:confused:

It's necessary for one Certbot upgrade. (Some of the packages got renamed.) I think that's why it's stuck on 0.21.1.

Reinstalling it might fix it -- though it would be better to know how it broke in the first place -- but you also should upgrade it.

Hey there,

So I did upgrade of Certbot (apt-get upgrade certbot). When I run ‘certbot renew --dry-run’ in root user it outputs the following:

Traceback (most recent call last):
File “/usr/bin/certbot”, line 11, in
load_entry_point(‘certbot==0.26.1’, ‘console_scripts’, ‘certbot’)()
File “/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”, line 484, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”, line 2707, in load_entry_point
return ep.load()
File “/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”, line 2325, in load
return self.resolve()
File “/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”, line 2331, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/lib/python3/dist-packages/certbot/main.py”, line 9, in
import configobj
ImportError: No module named ‘configobj’

I somethings up with the current version of Python and Certbot newer version since upgrade.

Python version = Python 2.7.12

Extract from checking Certbot version:

||/ Name Version Architecture Description
++±==============================================-============================-============================-==================================================================================================
ii certbot 0.26.1-1+ubuntu16.04.1+certb all automatically configure HTTPS using Let’s Encrypt

ii python-certbot-nginx 0.25.0-2+ubuntu16.04.1+certb all transitional dummy package

ii python3-certbot 0.26.1-1+ubuntu16.04.1+certb all main library for certbot

ii python3-certbot-nginx 0.25.0-2+ubuntu16.04.1+certb all Nginx plugin for Certbot

The newer packages are actually using Python 3. (3.5, it seems.)

Can you post "dpkg -l python3-configobj"?

||/ Name Version Architecture Description
++±==============================================-============================-============================-==================================================================================================
ii python3-configobj 5.0.6-2+ubuntu16.04.1+certbo all simple but powerful config file reader and writer for Python 3

Might’ve been a messy copy / paste.

python3-configobj / 5.0.6-2+ubuntu16.04.1+certbo / all

So it’s installed but Certbot can’t find it. :confounded:

How about:

ls -l /usr/lib/python3*/dist-packages/configobj.py

python3 -c "import sys; print(sys.path)"

Edit: And also, just in case:

python3.5 -c "import sys; print('\n'.join(sys.path))"

which python3

which python3.5

ls -l /usr/lib/python3*/dist-packages/configobj.py

ls: cannot access ‘/usr/lib/python3*/dist-packages/configobj.py’: No such file or directory

python3 -c “import sys; print(sys.path)”

[’’, ‘/usr/lib/python35.zip’, ‘/usr/lib/python3.5’, ‘/usr/lib/python3.5/plat-x86_64-linux-gnu’, ‘/usr/lib/python3.5/lib-dynload’, ‘/usr/local/lib/python3.5/dist-packages’, ‘/opt/src/solrclient’, ‘/opt/message-broker’, ‘/usr/lib/python3/dist-packages’]

python3.5 -c “import sys; print(’\n’.join(sys.path))”

/usr/lib/python35.zip
/usr/lib/python3.5
/usr/lib/python3.5/plat-x86_64-linux-gnu
/usr/lib/python3.5/lib-dynload
/usr/local/lib/python3.5/dist-packages
/opt/src/solrclient
/opt/message-broker
/usr/lib/python3/dist-packages

which python3

/usr/bin/python3

which python3.5

/usr/bin/python3.5

If you don’t mind triple checking something else:

find /usr -name configobj.py -ls

dpkg -L python3-configobj

This makes no sense. You’re missing files from packages that are installed. First Certbot, and now the Python library ConfigObj.

No worries,

Running ‘find /usr -name configobj.py -ls’ produced nothing - no results.

dpkg -L python3-configobj

/.
/usr
/usr/lib
/usr/lib/python3
/usr/lib/python3/dist-packages
/usr/lib/python3/dist-packages/_version.py
/usr/lib/python3/dist-packages/validate.py
/usr/lib/python3/dist-packages/configobj.py
/usr/lib/python3/dist-packages/configobj-5.0.6.egg-info
/usr/lib/python3/dist-packages/configobj-5.0.6.egg-info/requires.txt
/usr/lib/python3/dist-packages/configobj-5.0.6.egg-info/top_level.txt
/usr/lib/python3/dist-packages/configobj-5.0.6.egg-info/PKG-INFO
/usr/lib/python3/dist-packages/configobj-5.0.6.egg-info/dependency_links.txt
/usr/share
/usr/share/doc
/usr/share/doc/python3-configobj
/usr/share/doc/python3-configobj/changelog.Debian.gz
/usr/share/doc/python3-configobj/copyright

It's right there!

But it's not!

:exploding_head:

Reinstalling python3-configobj might fix this, but it's extremely weird. And there could be other missing files as well.

I’m just as gobsmacked, it’s installed but not entirely there. Same for Certbot.

Thank you will try reinstalling ‘python3-configobj’ and hope for the best.

Keep in touch.

Hi @mnordhoff

I have managed to get this working again. However I cannot still explain where it went all wrong.

The steps I took (for interest sake) was: Removing ‘python3-configobj’ and ‘python-certbot-nginx’ then reinstalling ‘python-certbot-nginx’ and ‘python3 -m pip install pyOpenSSL --upgrade’ .

Thanks for your assistance, much appreciated!

Good day further.

Cheers.

Sounds like incomplete malware|hacker|exploit attempt.
I would shore up the system and check the access logs.

There are other – possibly worse – options.

Using apt and pip to add and remove the same packages could possibly result in them partially deleting each other’s files.

Or disk failure.

Noted, worth checking out indeed. Thanks.

Thanks. Will look into this.

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