@Chris White Thank you for taking the time to help out ---
okay, I made the change to match the api_url above. I got the following error when I run my script (attached). If I visit
http://0.0.0.0:4200/api/health in my browser, it returns true -- also, if I visit
http://127.0.0.1:4200/api/docs they all seem to work --- But seems to error out when I run my script in the container (wont talk to the server). I still am unable to get prefect working. Is there some other ENV vars I need to change?
=========================================================================================
ENV PREFECT_SERVER_ANALYTICS_ENABLED=false \
PREFECT_API_URL=
http://0.0.0.0:4200/api
=========================================================================================
docker run -it --gpus all -d --name parse-container --network="host" -v %cd%:/app py-dev-gpu:2024SEP
=========================================================================================
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/prefect/client/orchestration.py", line 415, in api_healthcheck
await self._client.get("/health")
File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1801, in get
return await self.request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1574, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/client/base.py", line 358, in send
response.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/prefect/client/base.py", line 171, in raise_for_status
raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.
cause
prefect.exceptions.PrefectHTTPStatusError: Server error '503 Service Unavailable' for url '
http://0.0.0.0:4200/api/health'
For more information check:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/scripts/hello_prefect.py", line 20, in <module>
my_flow()
File "/usr/local/lib/python3.11/site-packages/prefect/flows.py", line 1237, in
call
return enter_flow_run_engine_from_flow_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/engine.py", line 297, in enter_flow_run_engine_from_flow_call
retval = from_sync.wait_for_call_in_loop_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/api.py", line 218, in wait_for_call_in_loop_thread
return call.result()
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 318, in result
return self.future.result(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 179, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 389, in _run_async
result = await coro
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/client/utilities.py", line 100, in with_injected_client
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/engine.py", line 364, in create_then_begin_flow_run
await check_api_reachable(client, "Cannot create flow run")
File "/usr/local/lib/python3.11/site-packages/prefect/utilities/engine.py", line 680, in check_api_reachable
raise RuntimeError(
RuntimeError: Cannot create flow run. Failed to reach API at
http://0.0.0.0:4200/api/.