Problem renewal certificates

Hi,

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:

requests.exceptions.InvalidURL: Failed to parse: https://acme-v02.api.letsencrypt.org/directory
Please see the logfiles in /var/log/letsencrypt for more details.

Any idea what could be wrong? I have reinstalled urllib3 and certbot. Doesn't clear the issue.

Regards,
Karl

2 Likes

From searching around, it looks like it might be a problem with the python3-six package.

Perhaps try:

sudo apt install --reinstall python3-six
4 Likes

Did the reinstall. Didn't fix the issue.
wget https://acme-v02.api.letsencrypt.org/directory is working fine. So the site is reachable.

2 Likes

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.

3 Likes

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.

Thanks for your support.

2 Likes

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.

2 Likes

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