【发布时间】:2022-09-27 21:20:21
【问题描述】:
我将 Apache Airflow 用于日常 ETL 作业。我使用提供的 Helm 图表将它安装在 Azure Kubernetes 服务中。它已经运行了半年,但是最近我无法访问网络服务器中的日志(这曾经总是可以正常工作)。
我收到以下错误:
*** Log file does not exist: /opt/airflow/logs/dag_id=analytics_etl/run_id=manual__2022-09-26T09:25:50.010763+00:00/task_id=copy_device_table/attempt=18.log
*** Fetching from: http://airflow-worker-0.airflow-worker.default.svc.cluster.local:8793/dag_id=analytics_etl/run_id=manual__2022-09-26T09:25:50.010763+00:00/task_id=copy_device_table/attempt=18.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://airflow-worker-0.airflow-worker.default.svc.cluster.local:8793/dag_id=analytics_etl/run_id=manual__2022-09-26T09:25:50.010763+00:00/task_id=copy_device_table/attempt=18.log\'
For more information check: https://httpstatuses.com/403
我尝试了什么:
- 我已确保日志文件存在(我可以执行到airflow-worker-0 pod 并在命令行中错误指定的位置读取文件)。
- 我已将我的部署回滚到较早的提交,当我确定它仍在工作时,但它没有任何区别。
- 我在
values.yaml配置中使用了webserverSecretKeySecretName。我更改了该名称所指向的秘密(删除它并创建了一个新的,如此处所述:https://airflow.apache.org/docs/helm-chart/stable/production-guide.html#webserver-secret-key)但它不起作用(没有区别,同样的错误)。 - 我将配置改为使用
webserverSecretKey(纯文本),没有区别。
我的想法/观察:
- 错误表明日志文件不存在,但事实并非如此。它可能只是无法访问它。
- 所有 pod 的时间都是相同的(我仔细检查了它们是否执行并在命令行中输入
date) - worker、调度程序和 webserver 中的 webserver 密码是相同的(我通过执行它们并找到相应的 env 变量进行了双重检查)
有任何想法吗?
标签: azure kubernetes airflow