Hello, I am trying to configure Prefect CLI in my ...
# prefect-ui
l
Hello, I am trying to configure Prefect CLI in my entrypoint.sh file - loading the config with all variables like prefect workspace, api key etc. Then when I try to do the following: # Configure prefect CLI to use server backend echo "Configuring Prefect2 CLI..."
Copy code
prefect cloud login --key "$PREFECT_TOKEN" --workspace "$PREFECT_WORKSPACE"
echo "Done configuring Prefect CLI." I get the following httpx connection timeout error: Prefect Cloud ENABLED... Successfully parsed PREFECT_TOKEN (not displayed) Configuring Prefect2 CLI... Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/httpcore/backends/asyncio.py", line 114, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/usr/local/lib/python3.8/site-packages/anyio/_core/_sockets.py", line 192, in connect_tcp gai_res = await getaddrinfo( File "/usr/local/lib/python3.8/site-packages/anyio/_core/_sockets.py", line 511, in getaddrinfo gai_res = await get_asynclib().getaddrinfo( File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 1690, in getaddrinfo result = await get_running_loop().getaddrinfo( File "/usr/local/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo return await self.run_in_executor( asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions yield File "/usr/local/lib/python3.8/site-packages/httpcore/backends/asyncio.py", line 121, in connect_tcp stream._raw_socket.setsockopt(*option) # type: ignore[attr-defined] # pragma: no cover File "/usr/local/lib/python3.8/site-packages/anyio/_core/_tasks.py", line 119, in exit raise TimeoutError TimeoutError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions yield File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 261, in handle_async_request raise exc File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request response = await connection.handle_async_request(request) File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 92, in handle_async_request raise exc File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 69, in handle_async_request stream = await self._connect(request) File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 117, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/usr/local/lib/python3.8/site-packages/httpcore/backends/auto.py", line 31, in connect_tcp return await self._backend.connect_tcp( File "/usr/local/lib/python3.8/site-packages/httpcore/backends/asyncio.py", line 121, in connect_tcp stream._raw_socket.setsockopt(*option) # type: ignore[attr-defined] # pragma: no cover File "/usr/local/lib/python3.8/contextlib.py", line 131, in exit self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.8/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/prefect/cli/_utilities.py", line 41, in wrapper return fn(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 260, in coroutine_wrapper return call() File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 245, in call return self.result() File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 173, in result return self.future.result(timeout=timeout) File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result return self.__get_result() File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result raise self._exception File "/usr/local/lib/python3.8/site-packages/prefect/_internal/concurrency/calls.py", line 218, in _run_async result = await coro File "/usr/local/lib/python3.8/site-packages/prefect/cli/cloud.py", line 391, in login workspaces = await client.read_workspaces() File "/usr/local/lib/python3.8/site-packages/prefect/client/cloud.py", line 72, in read_workspaces return pydantic.parse_obj_as(List[Workspace], await self.get("/me/workspaces")) File "/usr/local/lib/python3.8/site-packages/prefect/client/cloud.py", line 92, in get res = await self._client.get(route, **kwargs) File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1757, in get return await self.request( File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1617, in send response = await self._send_handling_auth( File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "/usr/local/lib/python3.8/contextlib.py", line 131, in exit self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout An exception occurred. Failed to register flows At C\WorkProject\dbt CustomerInsights LifeSciences\deploy\deploy dockerfile dev.ps161 char:27 + if (-not $?) {throw "Failed to register flows"} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (Failed to register flows:String) [], Run timeException + FullyQualifiedErrorId : Failed to register flows