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 2022/09/25 11:20:33 UTC

[GitHub] [airflow] HassanAlahmed opened a new issue, #26660: Logs are not accessible (403)

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

   ### Apache Airflow version
   
   2.4.0
   
   ### What happened
   
   When I want to view logs of a task using the webserver, I get the following error:
   ```
   *** Log file does not exist: /opt/airflow/logs/dag_id=<dag_id>/run_id=manual__2022-09-25T07:01:05.868611+00:00/task_id=get_new_batch_id/attempt=1.log
   *** Fetching from: http://<pod_name>.<cluster_info>:8793/dag_id=<dag_id>/run_id=manual__2022-09-25T07:01:05.868611+00:00/task_id=get_new_batch_id/attempt=1.log
   *** !!!! Please make sure that all your Airflow components (e.g. schedulers, webservers and workers) have the same 'secret_key' configured in 'webserver' section and time is synchronized on all your machines (for example with ntpd) !!!!!
   ****** See more at https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key
   ****** Failed to fetch log file from worker. Client error '403 FORBIDDEN' for url 'http://<pod_name>.<cluster_info>:8793/dag_id=<dag_id>/run_id=manual__2022-09-25T07:01:05.868611+00:00/task_id=get_new_batch_id/attempt=1.log'
   For more information check: https://httpstatuses.com/403
   ```
   
   When I checked the worker logs, I saw the following:
   ```
   9/25/2022, 2:05:14 PM
   fruits360-worker-1
   a8605871a22add46d78ba98798e60a2d181364f0554c9427b479b5447354b744
   [2022-09-25T11:05:14.765+0000] {serve_logs.py:104} WARNING - Unknown error
   
   9/25/2022, 2:05:14 PM
   fruits360-worker-1
   a8605871a22add46d78ba98798e60a2d181364f0554c9427b479b5447354b744
   Traceback (most recent call last):
   
   9/25/2022, 2:05:14 PM
   fruits360-worker-1
   a8605871a22add46d78ba98798e60a2d181364f0554c9427b479b5447354b744
   File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/serve_logs.py", line 64, in validate_pre_signed_url
   
   9/25/2022, 2:05:14 PM
   fruits360-worker-1
   a8605871a22add46d78ba98798e60a2d181364f0554c9427b479b5447354b744
   request_filename = request.view_args['filename']
   
   9/25/2022, 2:05:14 PM
   fruits360-worker-1
   a8605871a22add46d78ba98798e60a2d181364f0554c9427b479b5447354b744
   TypeError: 'NoneType' object is not subscriptable
   ```
   
   ### What you think should happen instead
   
   I'm not sure why request.view_args is not subscriptable.
   
   ### How to reproduce
   
   _No response_
   
   ### Operating System
   
   linux vm from Azure
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   helm 1.6.0 with a custom docker image. Dockerfile is:
   ```
   FROM apache/airflow:2.4.0
   
   RUN pip install --no-cache-dir --user apache-airflow-providers-microsoft-mssql==3.2.0
   
   COPY ./dags/ /opt/airflow/dags
   ```
   
   ### Anything else
   
   Deployed in Azure Kubernetes Cluster. Everything is in one node except for the metadata db, which runs in an Azure Database for PostgreSQL flexible server.
   
   ### 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: commits-unsubscribe@airflow.apache.org.apache.org

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


[GitHub] [airflow] HassanAlahmed closed issue #26660: Logs are not accessible (403)

Posted by GitBox <gi...@apache.org>.
HassanAlahmed closed issue #26660: Logs are not accessible (403)
URL: https://github.com/apache/airflow/issues/26660


-- 
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] HassanAlahmed commented on issue #26660: Logs are not accessible (403)

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

   Duplicate of #26490 


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