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

   ### Apache Airflow version
   
   3.0.1
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   After upgrading to airflow 3.0.1, remote logging is not working as intended.
   I have set airflow.cfg for remote logging as below:
   `
   remote_logging = True
   remote_log_conn_id = s3_conn
   delete_local_logs = True
   remote_base_log_folder = s3://my-logs
   remote_task_handler_kwargs = {"delete_local_copy": true}
   `
   
   But airflow ui fails to fetch logs for both cases, triggering with ui and 
cli. Also the tasks are marked as fail.
   ["Could not read served logs: Invalid URL 
'http://:8793/log/dag_id=init_test_3.0.1/run_id=manual__2025-05-21T02:10:37.485869+00:00/task_id=print_time/attempt=1.log':
 No host supplied"]
   
   However, when i run airflow dags test with cli, my tasks succeed, but still 
fails to read logs.
   ["Could not read served logs: 
HTTPConnectionPool(host='ip-172-29-XX-XX.ap-northeast-2.compute.internal', 
port=8793): Max retries exceeded with url: 
/log/dag_id=init_test_3.0.1/run_id=manual__2025-05-21T02:15:10.539747+00:00/task_id=print_time/attempt=1.log
 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 
0xffff73126db0>: Failed to establish a new connection: [Errno 111] Connection 
refused'))"]
   
   
   I can see the remote logging has not been configured properly, but I don't 
know why. 
   
   ### What you think should happen instead?
   
   I expect my tasks my tasks to succeed and the logs are fetched remotely from 
s3.
   
   ### How to reproduce
   
   `
   remote_logging = True
   remote_log_conn_id = s3_conn
   delete_local_logs = True
   remote_base_log_folder = s3://my-logs
   remote_task_handler_kwargs = {"delete_local_copy": true}
   `
   
   ### Operating System
   
   Debian GNU/Linux
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other Docker-based deployment
   
   ### Deployment details
   
   I am running airflow on ECS, using apache/airflow:3.0.1-python3.12 base image
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] 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