GitHub user tzuwei93 added a comment to the discussion: Could not read served logs: Invalid URL 'http://:8793....': Not host supplied
Firstly, the `base_url` configuration is intended for accessing the `Airflow` webserver, not for retrieving logs from the worker server. The worker server might have a different hostname, e.g., `airflow-worker.airflow.svc.cluster.local`. The worker server is responsible for fetching logs from the worker's filesystem in `airflow` version of , as mentioned in a recent [discussion](https://github.com/apache/airflow/discussions/44478) about failing to retrieve logs after multiple task retries, and also referenced in the [code snippet](https://github.com/apache/airflow/blob/168f76562e617cd8e8a41ec684bfda09db6b5705/airflow/utils/serve_logs.py#L168). I have just encountered a similar issue, and the exception I got was “`[Errno -3] Temporary failure in name resolution.`” , which indicates that the hostname recorded in `PostgreSQL` is temporarily unresolvable. In my case, the problem was caused by the Airflow worker service is mounting an incorrect destination path for existing log files, which led to retrieving logs from the worker server instead. However, in your situation, it seems the issue might stem from the hostname not being recorded correctly to `PostgreSQL` backend. As the exception stating “`no host supplied`” suggests that there seems to be no hostname was recorded for this specific task instance. One possible cause is that the task instances crashed unexpectedly without recording the `worker`'s hostname. In your case, I would first verifying whether logs for successfully executed `DAGs` are displayed correctly in the `webserver` UI. This might help determine if the issue is isolated to this specific task instances or some other issue, which might be a broader problem with hostname recording. Additionally, you could check if the log is present at the corresponding path you expected. If any part of my reasoning or logic is incorrect, please feel free to point it out. :) GitHub link: https://github.com/apache/airflow/discussions/45525#discussioncomment-11807659 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
