SSL3_GET_RECORD:wrong version number exception during requests to Google Analytics API
See original GitHub issueWhen using the client to make requests to the Google Analytics, API, we see the following exception occasionally. It can usually be solved by making retrying the request.
...
data = service.data().ga().get(*args, **kwargs).execute(num_retries=3)
File "/Users/jessepollak/.virtualenvs/clef/lib/python2.7/site-packages/oauth2client/util.py", line 129, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Users/jessepollak/.virtualenvs/clef/lib/python2.7/site-packages/googleapiclient/http.py", line 716, in execute
body=self.body, headers=self.headers)
File "/Users/jessepollak/.virtualenvs/clef/lib/python2.7/site-packages/oauth2client/util.py", line 129, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Users/jessepollak/.virtualenvs/clef/lib/python2.7/site-packages/oauth2client/client.py", line 533, in new_request
redirections, connection_type)
File "/Users/jessepollak/.virtualenvs/clef/lib/python2.7/site-packages/httplib2/__init__.py", line 1570, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/Users/jessepollak/.virtualenvs/clef/lib/python2.7/site-packages/httplib2/__init__.py", line 1317, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/Users/jessepollak/.virtualenvs/clef/lib/python2.7/site-packages/httplib2/__init__.py", line 1286, in _conn_request
response = conn.getresponse()
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1045, in getresponse
response.begin()
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 409, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 476, in readline
data = self._sock.recv(self._rbufsize)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 241, in recv
return self.read(buflen)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 160, in read
return self._sslobj.read(len)
SSLError: [Errno 1] _ssl.c:1426: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
Issue Analytics
- State:
- Created 9 years ago
- Reactions:3
- Comments:13 (5 by maintainers)
Top Results From Across the Web
SSL routines', 'ssl3_get_record', 'wrong version number'
Im running an analytics server that connects to Instgram through the requests library. I'm using proxies and 1 out of 5 of the...
Read more >Error Responses | Analytics Core Reporting API
If an error occurs with a request, the API returns an HTTP status code, status, and reason in the response based on the...
Read more >ssl wrong version number | The Search Engine You Control
The error ssl3_get_record:wrong version number is sometimes caused by Nuxt doing its server-side rendering over https without valid certificates (or with self- ...
Read more >Troubleshooting SSL - GitLab Docs
If no symlinks are created in /opt/gitlab/embedded/ssl/certs/ and you see the message ... errno=0 state=error: wrong version number (OpenSSL::SSL::SSLError).
Read more >Common 503 errors on Fastly | Fastly Help Guides
This error occurs if the request times out while waiting for Fastly to establish a TCP connection to your origin or waiting for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Somewhat “confirms” what our other experience indicates.
If you’re still having this issue, check out: https://developers.google.com/api-client-library/python/guide/thread_safety
It’ll increase the memory consumption a teensy bit (i.e. just by the size of one instance) but you won’t have these issues where one thread eats the bytes intended for another.
@jessepollak Were you by any chance using the same
httplib2.Http
instance in multiple threads?