dtcarls / fantasy_football_chat_bot

GroupMe Discord and Slack Chatbot for ESPN Fantasy Football
GNU General Public License v3.0
296 stars 234 forks source link

SSLError [WRONG_VERSION_NUMBER] #61

Closed csabatini closed 5 years ago

csabatini commented 5 years ago

Seeing some SSL errors this evening, curious if anyone else experienced the same thing, or if it could be my environment.

I rebuilt the latest docker image from master today and re-deployed (running on local linux machine). Have been running the bot without this issue in prior weeks.

Job "bot_main (trigger: cron[day_of_week='sun', hour='16,20'], next run at: 2019-09-29 16:
00:00 EDT)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3-1.25.5-py3.7.egg/urllib3/connection
pool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3-1.25.5-py3.7.egg/urllib3/connection
pool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3-1.25.5-py3.7.egg/urllib3/connection
pool.py", line 994, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3-1.25.5-py3.7.egg/urllib3/connection
.py", line 394, in connect
    ssl_context=context,
  File "/usr/local/lib/python3.7/site-packages/urllib3-1.25.5-py3.7.egg/urllib3/util/ssl_.
py", line 370, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.7/ssl.py", line 423, in wrap_socket
    session=session
  File "/usr/local/lib/python3.7/ssl.py", line 870, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.7/ssl.py", line 1139, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests-2.22.0-py3.7.egg/requests/adapters
.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3-1.25.5-py3.7.egg/urllib3/connection
pool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3-1.25.5-py3.7.egg/urllib3/util/retry
.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='fantasy.espn.com', port=443):
Max retries exceeded with url: /apis/v3/games/FFL/seasons/2019/segments/0/leagues/14434 (C
aused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:10
76)')))
csabatini commented 5 years ago

Forgot to mention the bot did not post at the normal time which led to me checking this. Restarted the container, and I'll see if bot can post successfully tomorrow.

csabatini commented 5 years ago

Seems to be my environment, also having trouble building the image which downloads from PyPI now