Why does yum throw errors like M2Crypto.SSL.SSLError certificate verify failed when executed?

Solution Verified - Updated -


  • System is registered with RHN classic. When yum commands are executed, it throws the following errors.

    #yum repolist
    Loaded plugins: product-id, rhnplugin, security, subscription-manager
    certificate verify failed
    This system is not registered with RHN Classic or RHN Satellite.
    You can use rhn_register to register.
    RHN Satellite or RHN Classic support will be disabled.
    dvd-server                                                                     | 1.5 kB     00:00
    dvd-server/primary                                                             | 945 kB     00:00
    dvd-server                                                                              3363/3363
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in ?
        yummain.user_main(sys.argv[1:], exit_code=True)
      File "/usr/share/yum-cli/yummain.py", line 309, in user_main
        errcode = main(args)
      File "/usr/share/yum-cli/yummain.py", line 178, in main
        result, resultmsgs = base.doCommands()
      File "/usr/share/yum-cli/cli.py", line 349, in doCommands
        return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
      File "/usr/share/yum-cli/yumcommands.py", line 788, in doCommand
      File "/usr/lib/python2.4/site-packages/yum/repos.py", line 260, in populateSack
        sack.populate(repo, mdtype, callback, cacheonly)
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
        if self._check_db_version(repo, mydbtype):
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 226, in _check_db_version
        return repo._check_db_version(mdtype)
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1226, in _check_db_version
        repoXML = self.repoXML
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1399, in <lambda>
        repoXML = property(fget=lambda self: self._getRepoXML(),
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1391, in _getRepoXML
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1381, in _loadRepoXML
        return self._groupLoadRepoXML(text, ["primary"])
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1365, in _groupLoadRepoXML
        if self._commonLoadRepoXML(text):
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1201, in _commonLoadRepoXML
        result = self._getFileRepoXML(local, text)
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 974, in _getFileRepoXML
        cache=self.http_caching == 'all')
      File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 811, in _getFile
      File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 412, in urlgrab
        return self._mirror_try(func, url, kw)
      File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 398, in _mirror_try
        return func_ref( *(fullurl,), **kwargs )
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 936, in urlgrab
        return self._retry(opts, retryfunc, url, filename)
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 854, in _retry
        r = apply(func, (opts,) + args, {})
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 922, in retryfunc
        fo = URLGrabberFileObject(url, filename, opts)
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1010, in __init__
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1093, in _do_open
        fo, hdr = self._make_request(req, opener)
      File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1202, in _make_request
        fo = opener.open(req)
      File "/usr/lib64/python2.4/urllib2.py", line 358, in open
        response = self._open(req, data)
      File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
        '_open', req)
      File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
        result = func(*args)
      File "/usr/lib64/python2.4/site-packages/M2Crypto/m2urllib2.py", line 82, in https_open
        h.request(req.get_method(), req.get_selector(), req.data, headers)
      File "/usr/lib64/python2.4/httplib.py", line 810, in request
        self._send_request(method, url, body, headers)
      File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request
      File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
      File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
      File "/usr/lib64/python2.4/httplib.py", line 652, in send
      File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 55, in connect
        sock.connect((self.host, self.port))
      File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 174, in connect
        ret = self.connect_ssl()
      File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 167, in connect_ssl
        return m2.ssl_connect(self.ssl, self._timeout)
    M2Crypto.SSL.SSLError: certificate verify failed


  • Red Hat Enterprise Linux 5.11
  • Red Hat Satellite 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In