pyrax: SSLError: bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)
Attempting to use django-cumulus, and a fresh install yields:
ERROR:root:Pyrax Connect Error in `django_cumulus.cumulus.authentication.Auth`::
self.pyrax.set_credentials(self.username, self.api_key)
Traceback (most recent call last):
File "/Environments/easy/local/lib/python2.7/site-packages/cumulus/authentication.py", line 51, in __init__
self.pyrax.set_credentials(self.username, self.api_key)
File "/Environments/easy/local/lib/python2.7/site-packages/pyrax/__init__.py", line 439, in _wrapped
return fnc(*args, **kwargs)
File "/Environments/easy/local/lib/python2.7/site-packages/pyrax/__init__.py", line 502, in set_credentials
tenant_id=tenant_id, region=region, authenticate=authenticate)
File "/Environments/easy/local/lib/python2.7/site-packages/pyrax/identity/rax_identity.py", line 68, in set_credentials
region=region, tenant_id=tenant_id, authenticate=authenticate)
File "/Environments/easy/local/lib/python2.7/site-packages/pyrax/base_identity.py", line 420, in set_credentials
self.authenticate()
File "/Environments/easy/local/lib/python2.7/site-packages/pyrax/identity/rax_identity.py", line 83, in authenticate
password=password, api_key=api_key, tenant_id=tenant_id)
File "/Environments/easy/local/lib/python2.7/site-packages/pyrax/base_identity.py", line 599, in authenticate
headers=headers, std_headers=False)
File "/Environments/easy/local/lib/python2.7/site-packages/pyrax/base_identity.py", line 531, in method_post
return self._call("POST", uri, admin, data, headers, std_headers)
File "/Environments/easy/local/lib/python2.7/site-packages/pyrax/base_identity.py", line 570, in _call
return pyrax.http.request(mthd, uri, verify=self.verify_ssl, **kwargs)
File "/Environments/easy/local/lib/python2.7/site-packages/pyrax/http.py", line 63, in request
resp = req_method(uri, data=data, **kwargs)
File "/Environments/easy/local/lib/python2.7/site-packages/requests/api.py", line 107, in post
return request('post', url, data=data, json=json, **kwargs)
File "/Environments/easy/local/lib/python2.7/site-packages/requests/api.py", line 53, in request
return session.request(method=method, url=url, **kwargs)
File "/Environments/easy/local/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/Environments/easy/local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/Environments/easy/local/lib/python2.7/site-packages/requests/adapters.py", line 447, in send
raise SSLError(e, request=request)
SSLError: bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)
This appears to be a resurrection of https://github.com/rackspace/pyrax/issues/545
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (11 by maintainers)
@thijstriemstra: Ahh, good find. Rather than remove certifi completely, I’ve pinned it at the previous version as suggested in some of the comments in that thread. This did it for me:
pip uninstall -y certifi && sudo pip install certifi==2015.04.28Just going to throw it out there that as a brand new user with a brand new virtualenv, I ran into this error. Fix was to install the OLD version of certifi. This is literally the first thing I did with pyrax and it makes it feel pretty wonky.
Oh fuck, thanks for the suggestion. Time to dig deeper. Blah.