ChuckMac / ADRFinder

Self-Hosted, Open Source, Advanced Dining Reservation Notifications for Disney World
Apache License 2.0
37 stars 11 forks source link

Docker Issue - Connection Refused #22

Closed tchmnkyz closed 1 year ago

tchmnkyz commented 1 year ago

I have ran into a small problem when trying to deploy this app to a kube cluster...

as soon as it starts up, i get the following error;

(1) wsgi starting up on http://0.0.0.0:5500
>> Request failed, Unable to get AUTH cookie: [Errno 111] Connection refused
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/app/adrfinder/fetch_site_status.py", line 34, in get_auth_cookie
    connection.request("POST", "/finder/api/v1/authz/public", payload, headers)
  File "/usr/local/lib/python3.11/http/client.py", line 1286, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1332, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1281, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1041, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.11/http/client.py", line 979, in send
    self.connect()
  File "/usr/local/lib/python3.11/http/client.py", line 1451, in connect
    super().connect()
  File "/usr/local/lib/python3.11/http/client.py", line 945, in connect
    self.sock = self._create_connection(
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/app/adrfinder/update_worker.py", line 26, in run
    update_handler = fetch_site_status.perform_site_check(datastore=self.datastore)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/adrfinder/fetch_site_status.py", line 16, in __init__
    self.headers = self.get_auth_cookie()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/adrfinder/fetch_site_status.py", line 38, in get_auth_cookie
    raise Exception("Request failed, Unable to get AUTH cookie: {}".format(e))
Exception: Request failed, Unable to get AUTH cookie: [Errno 111] Connection refused

I have tried it on multiple versions and get the same error. I am not sure why we are getting this issue.

I can see the app running:

root           1  0.9  0.9 467736 81080 ?        Ssl  21:26   0:01 python ./adrfinder.py -d /datastore

it is listening too:

python    1 root    5u  IPv4 4781420      0t0  TCP *:5500 (LISTEN)

Any thoughts on how to resolve this?

tchmnkyz commented 1 year ago

After much fighting i was able to correct this issue. The problem was a DNS blacklist that was blocking disney's site.