You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When deploying a Prefect worker via Helm with a misconfigured serverApiConfig.apiUrl, the worker fails to establish a connection but only logs debug-level messages about the connection attempt without surfacing an explicit error. This occurs despite debug: true in the worker configuration.
01:53:36.933 | DEBUG | prefect.profiles - Using profile 'ephemeral'
01:53:38.718 | DEBUG | prefect.client - Connecting to API at http://prefect-server.prefect.svc.cluster.local/api/
Expected Behavior
The worker should log a clear error (e.g., ConnectionError, Timeout, or InvalidURL) when unable to reach the Prefect server, including retry attempts if applicable.
Version info
Version: 3.2.2
API version: 0.8.4
Python version: 3.11.11
Git commit: d982c69a
Built: Thu, Feb 13, 2025 10:53 AM
OS/Arch: linux/x86_64
Profile: ephemeral
Server type: server
Pydantic version: 2.10.6
Integrations:
prefect-redis: 0.2.2
prefect-kubernetes: 0.5.3
Additional context
I am using the default prefect server service from the helm charts.
The text was updated successfully, but these errors were encountered:
Thanks for the issue @archi-max! We log to stderr for connection errors and they look like this:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 394, in handle_async_request
resp = await self._pool.handle_async_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 256, in handle_async_request
raise exc from None
File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 236, in handle_async_request
response = await connection.handle_async_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
raise exc
File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection.py", line 78, in handle_async_request
stream = await self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection.py", line 124, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp
return await self._backend.connect_tcp(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/httpcore/_backends/anyio.py", line 113, in connect_tcp
with map_exceptions(exc_map):
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "/usr/local/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError: [Errno -2] Name or service not known
I can see output like that when deploying a worker using the Helm chart with a bad API URL, so I'm unsure why you aren't seeing this in your setup. Do you have any custom handling for stderr?
Bug summary
Description
When deploying a Prefect worker via Helm with a misconfigured
serverApiConfig.apiUrl
, the worker fails to establish a connection but only logs debug-level messages about the connection attempt without surfacing an explicit error. This occurs despitedebug: true
in the worker configuration.Expected Behavior
The worker should log a clear error (e.g.,
ConnectionError
,Timeout
, orInvalidURL
) when unable to reach the Prefect server, including retry attempts if applicable.Version info
Additional context
I am using the default prefect server service from the helm charts.
The text was updated successfully, but these errors were encountered: