Cannot import ssl_match_hostname

My domain is:

nitrosubs.live

I ran this command:

sudo certbot renew

It produced this output:

Traceback (most recent call last):
  File "/usr/bin/certbot", line 11, in <module>
    load_entry_point('certbot==0.37.2', 'console_scripts', 'certbot')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/site-packages/certbot/main.py", line 17, in <module>
    from certbot import account
  File "/usr/lib/python2.7/site-packages/certbot/account.py", line 17, in <module>
    from acme import messages
  File "/usr/lib/python2.7/site-packages/acme/messages.py", line 11, in <module>
    from acme import challenges
  File "/usr/lib/python2.7/site-packages/acme/challenges.py", line 12, in <module>
    import requests
  File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/usr/lib/python2.7/site-packages/urllib3/__init__.py", line 7, in <module>
    from .connectionpool import (
  File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 11, in <module>
    from .exceptions import (
  File "/usr/lib/python2.7/site-packages/urllib3/exceptions.py", line 2, in <module>
    from .packages.six.moves.http_client import (
  File "/usr/lib/python2.7/site-packages/urllib3/packages/__init__.py", line 3, in <module>
    from . import ssl_match_hostname
ImportError: cannot import name ssl_match_hostname

My web server is (include version):

node.js v10.16.3

The operating system my web server runs on is (include version):

openSUSE Tumbleweed 20190909 / Linux 5.2.11

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):

i can’t check because of the above error

Hi @fililip,

Welcome to the community forum!

This OpenSUSE Tumbleweed bug report seems pretty close to what you’re experiencing.

Am I correct in assuming that you installed certbot according to https://certbot.eff.org/lets-encrypt/tumbleweed-other ?

Does the error message change if you install the backports.ssl_match_hostname pip package? Please note that this is just a troubleshooting step and I’m not recommending it to solve the actual problem. https://pypi.org/project/backports.ssl_match_hostname/

Yes, I did install certbot from this guide, and it worked before (March + July 2019).
It was only recently when my certificate expired that I was not able to use the tool.

(I’ve already tried to install/reinstall the package you mentioned, but the error message keeps being printed.)

@fililip would you mind filing a bug at https://github.com/certbot/certbot/issues ?

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