You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/10 19:03:48 UTC

[GitHub] [airflow] dvd9604 opened a new issue #15767: Webserver changes the base path for the log on rerun of task 404

dvd9604 opened a new issue #15767:
URL: https://github.com/apache/airflow/issues/15767


   
   **Apache Airflow version**: 2.0.0
   
   **Environment**:
   - **OS** (e.g. from /etc/os-release): RHEL7
   - **Python**: 3.8.6
   - **Executor**: CeleryExecutor
   - **Workers**: 4 worker nodes
   - **logs dir**: /opt/airflow/logs/
   
   
   **What happened**:
   
   Scenario: Assume there are four workers labeled `host_a`, `host_b`, `host_c`, and `host_d`. The webserver and scheduler are running on another host `host_z`. When a task is ran for the first time it executes on `host_a` and the log file is created locally on that host. If the same task is cleared and ran again, it may execute on another host such as `host_b`. When navigating back to `1.log` after looking at `2.log` the webserver replaces hostname from `host_a` to `host_b` leading to the log file not being found.
   
   1. Task runs for first time `1.log` is created on `host_a`
   ```
   *** Log file does not exist: /opt/airflow/logs/dag_foo/task_bar/2021-05-10T15:54:44.662671+00:00/1.log
   *** Fetching from: http://hosta.domain.com:8793/log/dag_foo/task_bar/2021-05-10T15:54:44.662671+00:00/1.log
   ....
   ```
   
   2. Manually clear and run task again `2.log` created on `host_b`
   
   
   ```
   *** Log file does not exist: /opt/airflow/logs/dag_foo/task_bar/2021-05-10T15:54:44.662671+00:00/2.log
   *** Fetching from: http://hostb.domain.com:8793/log/dag_foo/task_bar/2021-05-10T15:54:44.662671+00:00/2.log
   .... rest of log
   ```
   
   
   3. Navigate back to `1.log`. Host has been replaced from `host_a` to `host_b` **hostb.domain.com:8793**
   
   ```
   *** Log file does not exist: /opt/airflow/logs/dag_foo/task_bar/2021-05-10T15:54:44.662671+00:00/1.log
   *** Fetching from: http://hostb.domain.com:8793/log/dag_foo/task_bar/2021-05-10T15:54:44.662671+00:00/1.log
   *** Failed to fetch log file from worker. 404 Client Error: NOT FOUND for url: http://hosta.domain.com:8793/log/dag_foo/task_bar/2021-05-10T15:54:44.662671+00:00/1.log
   ```
   
   
   **What you expected to happen**:
   Webserver should remember where a task ran.
   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] eladkal closed issue #15767: Webserver changes the base path for the log on rerun of task 404

Posted by GitBox <gi...@apache.org>.
eladkal closed issue #15767:
URL: https://github.com/apache/airflow/issues/15767


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] eladkal commented on issue #15767: Webserver changes the base path for the log on rerun of task 404

Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #15767:
URL: https://github.com/apache/airflow/issues/15767#issuecomment-997361144


   Closed as duplicate: https://github.com/apache/airflow/issues/16472


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #15767: Webserver changes the base path for the log on rerun of task 404

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #15767:
URL: https://github.com/apache/airflow/issues/15767#issuecomment-837160531


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org