I'm using Ubuntu 20.04.02 LTS and having issues with certbot. For a few weeks, I cannot renew my certificates.
CLI: certbot certonly --manual --preferred-challenges dns -d *.soc-bd.nl -d soc-bd.nl
I get the following error log:
aving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
An unexpected error occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/models.py", line 379, in prepare_url
scheme, auth, host, port, path, query, fragment = parse_url(url)
File "/usr/lib/python3/dist-packages/urllib3/util/url.py", line 392, in parse_url
return six.raise_from(LocationParseError(source_url), None)
File "", line 3, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: https://acme-v02.api.letsencrypt.org/directory
During handling of the above exception, another exception occurred:
Well, if I read the code for parse_url() correctly, the exception is raised on any ValueError or AttributeError in the try: block, which contains 24 lines of code.
However, without being able to reproduce the error, it's rather hard to debug it locally I'm afraid.
Fixed the problem. I have install certbot via apt install certbot. This version was causing the problem. The snap install version is ok. I will open a cause with Ubuntu.
I think the snap version of certbot comes with the Python dependencies embedded in the snap, so that would indeed fix this issue, but just for certbot. Other packages/applications might suffer from the same bug.