Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-506

[SSL: CERTIFICATE_VERIFY_FAILED] while connecting through HTTPS under OS X

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.1216
    • Component/s: Authentication
    • Sprint:
      drive-8.1-1, drive-8.1-2

      Description

      Since the upgrade to Python 2.7.10_2 on the OS X slave, Drive gets this error when connecting with urllib2 to a Nuxeo instance through HTTPS, even though the certificate is "valid".
      This blocks the authentication.
      Error occurs in WebSettingsApi._connect_startup_page:

      def _connect_startup_page(self, server_url):
              url = server_url + DRIVE_STARTUP_PAGE
              try:
                  proxy_handler = get_proxy_handler(self._manager.get_proxies())
                  opener = urllib2.build_opener(proxy_handler)
                  log.debug('Proxy configuration for startup page connection: %s, effective proxy list: %r',
                            self._manager.get_proxy_settings().config, get_opener_proxies(opener))
                  headers = {
                      'X-Application-Name': self._manager.get_appname(),
                      'X-Device-Id': self._manager.get_device_id(),
                      'X-Client-Version': self._manager.get_version(),
                      'User-Agent': self._manager.get_appname() + "/" + self._manager.get_version(),
                  }
                  req = urllib2.Request(url, headers=headers)
                  response = opener.open(req, timeout=STARTUP_PAGE_CONNECTION_TIMEOUT)
                  status = response.getcode()
              except urllib2.HTTPError as e:
                  status = e.code
              except:
                  log.exception('Error while trying to connect to Nuxeo Drive startup page with URL %s', url)
                  raise StartupPageConnectionError()
              log.debug('Status code for %s = %d', url, status)
              return status
      

      with the following stack trace:

      2015-12-15 11:46:14,550 19886 4633919488 ERROR    nxdrive.wui.settings Error while trying to connect to Nuxeo Drive startup page with URL https://intranet.nuxeo.com/nuxeo/drive_login.jsp
      Traceback (most recent call last):
        File "nxdrive/wui/settings.pyc", line 218, in _connect_startup_page
        File "urllib2.pyc", line 431, in open
        File "urllib2.pyc", line 449, in _open
        File "urllib2.pyc", line 409, in _call_chain
        File "urllib2.pyc", line 1240, in https_open
        File "urllib2.pyc", line 1197, in do_open
      URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
      
      

      This is related to https://www.python.org/dev/peps/pep-0476/

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: