Certbot no longer working after upgrade to ubuntu 18.04


#1

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. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: pbp.net (and a few others)

I ran this command: ./certbot-auto renew

It produced this output:

Error: couldn’t get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt:
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/site-packages/certbot/main.py”, line 5, in
import logging.handlers
File “/usr/lib/python2.7/logging/init.py”, line 26, in
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File “/usr/lib/python2.7/weakref.py”, line 14, in
from _weakref import (
ImportError: cannot import name _remove_dead_weakref

(to test, tried as regular user, with sudo, and as root)

very few changes except security updates and recent upgrade to 18.04 from 16.04.4

My web server is (include version): Apache/2.4.29

The operating system my web server runs on is (include version): “Ubuntu 18.04 LTS”

My hosting provider, if applicable, is: N/A

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


#2

Can you try renaming or deleting /opt/eff.org/certbot/ and running Certbot again? The installation is tied to the OS, it needs to be (automatically) reinstalled.

You could also take the opportunity to remove certbot-auto and switch to the Certbot PPA. You don’t have to, though.

https://launchpad.net/~certbot/+archive/ubuntu/certbot


#3

Ah, I didn’t know it was tied to the OS. Letting it reinstall allowed it to continue.

I can move to the PPA too. Is there a supported/safe way you can link me to? I’m always worried about leaving bits & pieces of previous installs around.

thank you!


#4
  1. Remove the automatic renewal cronjob you created for certbot-auto.
  2. sudo apt-add-repository ppa:certbot && sudo apt update && sudo apt install python-certbot-apache
  3. There is no Step 3. The Debian package provided by the PPA creates a new cronjob or systemd timer for itself automatically.

You can delete the certbot-auto script and /opt/eff.org/certbot if you would like. Just leave /etc/letsencrypt alone!


#5

@mnordhoff solved my original problem, and @patches thank you for the update. i was able to successfully update to the PPA, and certbot is working as expected again when I run it manually.

cheers!


#6

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