Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSLError: EOF occurred in violation of protocol #97

Closed
harishpendela opened this issue Apr 29, 2015 · 5 comments
Closed

SSLError: EOF occurred in violation of protocol #97

harishpendela opened this issue Apr 29, 2015 · 5 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@harishpendela
Copy link

I am using google-api-python-client_v1.2 on python 2.7.3. Often I see the following error while trying to build a drive service object. This is the stack trace:

drive_service = build('drive', 'v2', http=http)
File "/local/lib/python2.7/site-packages/google_api_python_client-1.2-py2.7.egg/oauth2client/util.py", line 132, in positional_wrapper
return wrapped(_args, *_kwargs)
File "/local/lib/python2.7/site-packages/google_api_python_client-1.2-py2.7.egg/apiclient/discovery.py", line 192, in build
resp, content = http.request(requested_url)
File "/local/lib/python2.7/site-packages/google_api_python_client-1.2-py2.7.egg/oauth2client/util.py", line 132, in positional_wrapper
return wrapped(_args, *_kwargs)
File "/local/lib/python2.7/site-packages/google_api_python_client-1.2-py2.7.egg/oauth2client/client.py", line 475, in new_request
self._refresh(request_orig)
File "/local/lib/python2.7/site-packages/google_api_python_client-1.2-py2.7.egg/oauth2client/client.py", line 653, in _refresh
self._do_refresh_request(http_request)
File "/local/lib/python2.7/site-packages/google_api_python_client-1.2-py2.7.egg/oauth2client/client.py", line 682, in _do_refresh_request
self.token_uri, method='POST', body=body, headers=headers)
File "/local/lib/python2.7/site-packages/httplib2/init.py", line 1593, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/local/lib/python2.7/site-packages/httplib2/init.py", line 1335, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/local/lib/python2.7/site-packages/httplib2/init.py", line 1257, in _conn_request
self.disable_ssl_certificate_validation, self.ca_certs)
File "/local/lib/python2.7/site-packages/httplib2/init.py", line 80, in _ssl_wrap_socket
cert_reqs=cert_reqs, ca_certs=ca_certs)
File "/usr/lib/python2.7/ssl.py", line 381, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/ssl.py", line 143, in init
self._sslobj.do_handshake()
SSLError: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol

@nathanielmanistaatgoogle
Copy link
Contributor

What's got you stuck using the two-years-old version 1.2 rather than the current 1.4.0? Are you able to reproduce the problem using 1.4.0?

@harishpendela
Copy link
Author

I recently updated my google-api-python-client to v1.4.0. I still see this issue.

@dhermes
Copy link
Contributor

dhermes commented Dec 17, 2015

@nathanielmanistaatgoogle See googleapis/google-cloud-python#1214 to understand what's the likely cause.

TL;DR: httplib2.Http is not thread-safe (ref)

I recommend closing this out

@nathanielmanistaatgoogle
Copy link
Contributor

@harishpendela, do you agree with @dhermes both about his suspected cause and that this issue should be closed?

@bantini
Copy link
Contributor

bantini commented Jan 19, 2018

Closing this issue assuming that it has been resolved. Feel free to reopen it if the problem appears.

@bantini bantini closed this as completed Jan 19, 2018
akrherz pushed a commit to akrherz/google-api-python-client that referenced this issue Apr 1, 2019
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

5 participants