sinaa328 opened a new issue, #56388:
URL: https://github.com/apache/airflow/issues/56388

   ### Apache Airflow version
   
   3.1.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   ### Deployment Details
   - Executor: CeleryExecutor  
   - Installation method: Installed via pip (not Docker or Kubernetes)  
   - Number of workers: 16  
   
   ### Issue Description
   Tasks occasionally fail immediately at the first task without producing any 
logs. The Airflow UI shows the following error:
   `Could not read served logs: Invalid URL 
'http://:8793/log/dag_id=.../task_id=.../attempt=1.log': No host supplied`
   After restarting Airflow services (webserver and scheduler), the problem 
temporarily resolves, but it reoccurs after days.
   
   ### Impact
   This issue is intermittent but recurring, making it difficult to rely on 
Airflow for production workloads. Even when tasks appear to succeed after a 
service restart, the problem resurfaces after some days, causing sudden DAG 
failures with no logs
   
   ### Observations / Notes
   - Restarting services temporarily fixes the issue.  
   - The problem seems related to hostname resolution or worker URL caching in 
the webserver.  
   - I monitored memory usage and noticed that the issue appears when system 
memory is nearly full — it seems that hostnames or related metadata are lost or 
not resolved correctly when memory pressure increases.  
   - The issue occurs intermittently and is hard to reproduce consistently, but 
becomes more likely over time as memory usage grows.
   
   ### What you think should happen instead?
   
   The Airflow webserver should consistently resolve and serve valid log URLs 
for all tasks, regardless of uptime or restart state.  
   Tasks should not fail immediately due to missing or malformed log endpoints, 
and restarts should not be required to restore normal behavior.
   
   
   ### How to reproduce
   
   1. Deploy Apache Airflow **3.x** using **CeleryExecutor**.  
      - For example, via Docker Compose or Kubernetes with multiple worker 
nodes.  
      - Ensure the webserver and scheduler run on separate hosts or containers. 
 
   2. Trigger any DAG with an initial lightweight task (e.g., `BashOperator` or 
`PythonOperator`).  
   3. Observe that **sometimes** the first task fails immediately, showing 
“failed” in the UI without any log output.  
   4. Open the task log view — it shows an error similar to:
   `Could not read served logs: Invalid URL 
'http://:8793/log/dag_id=.../task_id=.../attempt=1.log': No host supplied`
   5. Restart the Airflow webserver and/or scheduler.  
   6. Trigger the same DAG again — it runs successfully and the logs appear 
normally.  
   7. Wait a few days — the same issue reoccurs intermittently without any 
configuration changes.
   
   ### Operating System
   
   Ubuntu 24.04.2 LTS
   
   ### Versions of Apache Airflow Providers
   
   3.0.1
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to