# Ubuntu: "urllib3 or chardet doesn't match a supported version"?

**URL:** <https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458>\
**Category:** Help\
**Created:** [January 11, 2021, 2:25pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458 "2021-01-11T14:25:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gilgongo/32/24350_2.png) [@gilgongo](https://community.letsencrypt.org/u/gilgongo)\
**Post date:** [January 11, 2021, 2:25pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/1 "2021-01-11T14:25:53Z")

</div>

This issue is [similar to this one](https://community.letsencrypt.org/t/requestsdependencywarning-urllib3-1-13-1-or-chardet-3-0-4-doesnt-match-a-supported-version/39510) but not exactly, and that issue doesn't seem to have had a resolution, but apologies for possible dupe.

I'm using Certbot 0.27.0 on Ubuntu 18.04 with certbot installed from the Ubuntu standard repo. I have root CLI access.

I'm getting this:

```
~$ certbot --version
/usr/lib/python3/dist-packages/requests/ __init__.py:80: RequestsDependencyWarning: urllib3 (1.26.2) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
certbot 0.27.0

```

And the systemd unit for certbot service starts up and seems to renew certs OK, but then exits with this:

```
2021-01-11 08:38:56,710:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
  File "/usr/bin/certbot", line 11, in <module>
    load_entry_point('certbot==0.27.0', 'console_scripts', 'certbot')()
  File "/usr/lib/python3/dist-packages/certbot/main.py", line 1364, in main
    return config.func(config, plugins)
  File "/usr/lib/python3/dist-packages/certbot/main.py", line 1276, in renew
    renewal.handle_renewal_request(config)
  File "/usr/lib/python3/dist-packages/certbot/renewal.py", line 468, in handle_renewal_request
    len(renew_failures), len(parse_failures)))
certbot.errors.Error: 2 renew failure(s), 0 parse failure(s)

```

(the 2 renewal failures are I think expired domains)

Does anyone know what's going on or what's best to do?

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 6:02pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/2 "2021-01-11T18:02:38Z")

</div>

My best advice is to remove `certbot` from `apt` and install it via `snapd`.  
[Your 0.27.0 has seen its' final cert!]

---

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gilgongo/32/24350_2.png) [@gilgongo](https://community.letsencrypt.org/u/gilgongo)\
**Post date:** [January 11, 2021, 6:29pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/3 "2021-01-11T18:29:23Z")

</div>

Oh wow - I don't know anything about snaps. Is that now the recommended way of getting certbot for Ubuntu then?

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 6:31pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/4 "2021-01-11T18:31:22Z")

</div>

Yes and it comes shipped with Ubuntu...since 16.04?

---

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gilgongo/32/24350_2.png) [@gilgongo](https://community.letsencrypt.org/u/gilgongo)\
**Post date:** [January 11, 2021, 6:35pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/5 "2021-01-11T18:35:08Z")

</div>

OK this is I have to say a bit scary. So I `apt remove certbot` and then `snap install certbot` ? And all my certs and stuff will be fine?

Wow snap certbot is v 1.1.0?

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 6:38pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/6 "2021-01-11T18:38:46Z")

</div>

`apt remove certbot` will NOT remove any of your certs.  
Only `certbot delete --cert-name {name}` will do that.

Yes, simple, and painless 🙂

---

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gilgongo/32/24350_2.png) [@gilgongo](https://community.letsencrypt.org/u/gilgongo)\
**Post date:** [January 11, 2021, 6:39pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/7 "2021-01-11T18:39:54Z")

</div>

OK. I've got about 50 sites on the machine so I hope not. Here I go...

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 6:40pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/8 "2021-01-11T18:40:37Z")

</div>

Do `certbot certificates` before and after - they will be exactly the same.  
You might have to review your renewal jobs to ensure they run after the change.  
or  
better; do once:  
`certbot renew --dry-run`

Which should "cycle" through the motions and setup the cron/systemd.timer renewal job for you.

---

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gilgongo/32/24350_2.png) [@gilgongo](https://community.letsencrypt.org/u/gilgongo)\
**Post date:** [January 11, 2021, 6:44pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/9 "2021-01-11T18:44:23Z")

</div>

Oh.

```
~# snap install certbot
error: This revision of snap "certbot" was published using classic confinement and thus may perform arbitrary system changes outside of the security sandbox that snaps are usually confined to, which may put your system at risk. If you understand and want to proceed, repeat the command including --classic.

```

Now what?

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 6:45pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/10 "2021-01-11T18:45:00Z")

</div>

I see you don't follow guides much

```auto
sudo apt update
sudo apt install snapd
sudo snap install snap-store
sudo snap install --classic certbot

```

That should put it all up-to-date.

[Install certbot on Ubuntu using the Snap Store | Snapcraft](https://snapcraft.io/install/certbot/ubuntu)

---

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gilgongo/32/24350_2.png) [@gilgongo](https://community.letsencrypt.org/u/gilgongo)\
**Post date:** [January 11, 2021, 6:49pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/11 "2021-01-11T18:49:35Z")

</div>

OK I didn't even know there was a guide. Until 5mins ago I'd never installed a snap.

Seems to have done it OK:

```
~# snap install --classic certbot
2021-01-11T18:48:22Z INFO Waiting for automatic snapd restart...
certbot 1.11.0 from Certbot Project (certbot-eff✓) installed
```

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 6:51pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/12 "2021-01-11T18:51:48Z")

</div>

> [@rg305](#):
>
> Do `certbot certificates` before and after - they will be exactly the same.

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 6:53pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/13 "2021-01-11T18:53:12Z")

</div>

Just a curiosity...  
I gave you 4 command lines:

> [@rg305](#):
>
> ```nohighlight
> sudo apt update
> sudo apt install snapd
> sudo snap install snap-store
> sudo snap install --classic certbot
> 
> ```

How many did you run?

---

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gilgongo/32/24350_2.png) [@gilgongo](https://community.letsencrypt.org/u/gilgongo)\
**Post date:** [January 11, 2021, 6:55pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/14 "2021-01-11T18:55:13Z")

</div>

All of them.

Now I get:

```
~# certbot certificates 
bash: /usr/bin/certbot: No such file or directory

~# snap list
Name Version Rev Tracking Publisher Notes
certbot 1.11.0 889 latest/stable certbot-eff✓ classic
core20 20201210 904 latest/stable canonical✓ base
snapd 2.48.2 10707 latest/stable canonical✓ snapd

~# snap services
Service Startup Current Notes
certbot.renew disabled inactive timer-activated

```

Does the snap install put the certbot command somewhere else?

EDIT: Ah, I had to reload my shell.

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 6:57pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/15 "2021-01-11T18:57:16Z")

</div>

> [@gilgongo](#):
>
> Does the snap install put the certbot command somewhere else?

Yes.  
try:  
`/snap/bin/certbot --version`

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 7:00pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/16 "2021-01-11T19:00:30Z")

</div>

There is still some housecleaning things to tidy up:  
`cron/systemd.timer renewal jobs`  
` test a renewal`

---

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gilgongo/32/24350_2.png) [@gilgongo](https://community.letsencrypt.org/u/gilgongo)\
**Post date:** [January 11, 2021, 7:01pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/17 "2021-01-11T19:01:51Z")

</div>

> [@rg305](#):
>
> /snap/bin/certbot --version

certbot 1.11.0

Also systemd - is that not involved any more? Seems broken in some way:

```
~# service certbot status
● certbot.service
   Loaded: not-found (Reason: No such file or directory)
   Active: failed (Result: exit-code) since Mon 2021-01-11 08:38:56 GMT; 10h ago
 Main PID: 5068 (code=exited, status=1/FAILURE)

```

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 7:04pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/18 "2021-01-11T19:04:00Z")

</div>

Please review:  
`crontab -l`  
`crontab -u root -l`  
and  
`sudo systemctl list-timers`  
[Which may not be setup until cerbot 1.11.0 actually runs]

---

<div class="post-metadata">

**Author:** ![gilgongo](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/gilgongo/32/24350_2.png) [@gilgongo](https://community.letsencrypt.org/u/gilgongo)\
**Post date:** [January 11, 2021, 7:07pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/19 "2021-01-11T19:07:32Z")

</div>

> [@rg305](#):
>
> systemctl list-timers

That lists the snap.certbot.renew.service

`/etc/cron.d/certbot` contains this which I guess is OK to keep or should I delete the file?

`0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew`

EDIT: no - /usr/bin/certbot so I guess I should delete it.

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [January 11, 2021, 7:08pm UTC](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458/20 "2021-01-11T19:08:41Z")

</div>

Hopefully, this file no longer exists:

> [@gilgongo](#):
>
> /usr/bin/certbot

So, yes, remove it from cron.

[Next page](https://community.letsencrypt.org/t/ubuntu-urllib3-or-chardet-doesnt-match-a-supported-version/142458.md?page=2)
