Mike McWilliam
Mike McWilliam

Reputation: 176

gsutil ssl.SSLError: [Errno 185090050]

I am trying to get gsutil working on my machine, and it always fails with the following error:

ssl.SSLError: [Errno 185090050] _ssl.c:358: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib

There are a lot of posts about this error for other python applications, where the solution involves editing the source code. If the source code is the problem then the gsutil developers need to know about it, yet they don't advertise how a user would post a bug.

I may have made a mistake installing gsutil. Maybe I need get a certificate and set it up? But I have not idea how to do this.

I did manage to get around this by disabling server authentication in the .boto file. However for security I would prefer to have authentication working.

Hoping there are some people out there who could help me with this problem.

Upvotes: 2

Views: 937

Answers (2)

Partial update will fix the problem

Method 1 If you use gsutil source then

Update only httplib2 package https://github.com/httplib2/httplib2

Or

update only certificate inside httplib2 package https://github.com/httplib2/httplib2/blob/master/python2/httplib2/cacerts.txt

Method 2

specify system certificate to boto.xt file https://github.com/fout/fout/blob/master/review/google_snippet_status/templates/boto.xt

https_validate_certificates = True
ca_certificates_file = /etc/ssl/certs/ca-bundle.crt

ref: http://boto.cloudhackers.com/en/latest/boto_config_tut.html

**NOTE: ** In my case: If I use system like "ca_certificates_file = system" it gives some socket error

    Caught socket error, retrying: [Errno 185090050] _ssl.c:330: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
Retrying request to url <https://www.googleapis.com/storage/v1/b/adx-rtb-freakout-vd/o?   projection=full&prettyPrint=True&versions=False&fields=prefixes%2CnextPageToken%2Citems%2Fname&prefix=snippet_status&maxResults=500&delimiter=%2F&alt=json> after  connection break.
Caught socket error, retrying: [Errno 185090050] _ssl.c:330: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib

Retrying request to url https://www.googleapis.com/storage/v1/b/adx-rtb-freakout-vd/o?projection=full&prettyPrint=True&versions=False&fields=prefixes%2CnextPageToken%2Citems%2Fname&prefix=snippet_status&maxResults=500&delimiter=%2F&alt=json after connection break.

NOTE: Best is using latest gsutil and Python 2.7.X

Upvotes: 2

Rahul
Rahul

Reputation: 1021

I faced this problem on my Linux box today when I was writing a web application. For what its worth, here is my solution:

chmod a+r /usr/lib/python2.7/site-packages/httplib2-0.9.2-py2.7.egg/httplib2/cacerts.txt

Upvotes: -1

Related Questions