celiao / tmdbsimple

A wrapper for The Movie Database API v3.
GNU General Public License v3.0
579 stars 122 forks source link

SSL issues recently? #75

Closed mattdunn4465 closed 3 years ago

mattdunn4465 commented 3 years ago

Just curious if anyone else has noticed some ssl errors as of recent. It looks like api.themoviedb.org recently updated certs on the servers that I know of and am getting sporadic issues. Debugging right now but wondering if anyone else had seen this yet.

I installed a fresh install as well of ubuntu and python 3.7 etc.. to ensure my system was outdated with ssl or something that changed with ciphers etc...

Example

    return self._request('GET', path, params=params)
  File "/usr/local/lib/python3.6/dist-packages/tmdbsimple-2.7.0-py3.6.egg/tmdbsimple/base.py", line 86, in _request
    headers=self.headers)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 520, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 630, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 506, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.themoviedb.org', port=443): Max retries exceeded with url: /3/movie/338967/release_dates?api_key=SOMEKEY (Caused by SSLError(SSLError(1, '[SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2309)'),))
mattdunn4465 commented 3 years ago

api.themoviedb.org

52.84.16.98 52.84.16.45 52.84.16.110 52.84.16.88

I feel like i noticed a google issued cert and amazon certs. assuming theres some loadbalancing going on with their cdn network etc...

mattdunn4465 commented 3 years ago

I added information here as well https://www.themoviedb.org/talk/5fce79b8c0348b0040124570

mattdunn4465 commented 3 years ago

There was an issue with that specific cluster of hosts with performance when i was testing/debugging. Issue went away after DNS updated to some other cluster of hosts. However, this module doesn't take advantage of setting the requests parm for timeout/retry etc... and should probably be added in like someone mentioned before.