pylxd icon indicating copy to clipboard operation
pylxd copied to clipboard

Jenkins build failling with SSL error on requests

Open ajkavanagh opened this issue 6 years ago • 0 comments

The vital output from the Jenkins integration test:

(probably something has changed on requests, or similar)

Failing test:

integration installed: asn1crypto==0.24.0,attrs==19.1.0,certifi==2019.9.11,cffi==1.12.3,chardet==3.0.4,coverage==4.5.4,cryptography==2.7,ddt==1.2.1,entrypoints==0.3,flake8==3.7.8,funcsigs==1.0.2,idna==2.8,mccabe==0.6.1,mock==3.0.5,mock-services==0.3.1,nose==1.3.7,pbr==5.4.3,pkg-resources==0.0.0,pycodestyle==2.5.0,pycparser==2.19,pyflakes==2.1.1,-e git+https://github.com/lxc/pylxd@bf43969c42a4aaa06ee499f59d23e5e553864e24#egg=pylxd,python-dateutil==2.8.0,requests==2.22.0,requests-mock==1.1.0,requests-toolbelt==0.9.1,requests-unixsocket==0.2.0,six==1.12.0,urllib3==1.25.4,ws4py==0.5.1
integration runtests: PYTHONHASHSEED='3053410663'
integration runtests: commands[0] | nosetests integration
E......SSS..............................S....SSS
======================================================================
ERROR: test_authenticate (integration.test_client.TestClient)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/urllib3/connection.py", line 394, in connect
    ssl_context=context,
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 378, in ssl_wrap_socket
    return context.wrap_socket(sock)
  File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
  File "/usr/lib/python3.6/ssl.py", line 817, in __init__
    self.do_handshake()
  File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='127.0.0.1', port=8443): Max retries exceeded with url: /1.0 (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/pylxd/pylxd/client.py", line 308, in __init__
    response = self.api.get()
  File "/home/ubuntu/pylxd/pylxd/client.py", line 158, in get
    response = self.session.get(self._api_endpoint, *args, **kwargs)
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/home/ubuntu/pylxd/.tox/integration/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='127.0.0.1', port=8443): Max retries exceeded with url: /1.0 (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/pylxd/integration/test_client.py", line 29, in test_authenticate
    client = pylxd.Client('https://127.0.0.1:8443/', verify=False)
  File "/home/ubuntu/pylxd/pylxd/client.py", line 315, in __init__
    raise exceptions.ClientConnectionFailed(str(e))
pylxd.exceptions.ClientConnectionFailed: HTTPSConnectionPool(host='127.0.0.1', port=8443): Max retries exceeded with url: /1.0 (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))

----------------------------------------------------------------------
Ran 48 tests in 68.481s

FAILED (SKIP=7, errors=1)
ERROR: InvocationError: '/home/ubuntu/pylxd/.tox/integration/bin/nosetests integration'

ajkavanagh avatar Sep 20 '19 12:09 ajkavanagh