【问题标题】:Airflow - Failed to fetch log file气流 - 无法获取日志文件
【发布时间】:2021-03-24 20:01:45
【问题描述】:

我正在尝试在 Apache Airflow 上创建一个简单的 DAG 工作流,其中数据更新到我的本地 PostgreSQL 数据库。

谁能告诉我为什么我的 DAG 失败了,我只有在使用 CeleryExecutor 时才会在日志中看到这些错误?我尝试使用 LocalExecutor 运行相同的 DAG,但没有出现任何错误,并且运行顺利。

这是日志错误:

*** Log file isn't local.
*** Fetching here: http://<worker hostname>:8793/log/PDI_Incr_20190407_v2/checkBCWatermarkDt/2019-04-07T17:00:00/1.log
*** Failed to fetch log file from worker. 404 Client Error: NOT FOUND for url: http://<worker hostname>:8793/log/PDI_Incr_20190407_v2/checkBCWatermarkDt/2019-04-07T17:00:00/1.log

感谢您的帮助!

【问题讨论】:

    标签: python airflow


    【解决方案1】:

    最佳解决方案

    如果你想在你的web上查看日志,你需要配置worker节点的/etc/hosts的hostname映射,将worker节点的ip映射到机器的主机名:

    10.xxx.xxx.xxx  hostname
    

    然后你的请求:

    http://hostname.pl:8793/log/..
    

    快速解决方案

    如果您不想这样做,您可以在工作节点气流/日志/{dagName}/{taskName}/{executionTimestamp}/log.txt 中查看日志

    在您的情况下,它将是气流/日志/PDI_Incr_20190407_v2/checkBCWatermarkDt/2019-04-07T17:00:00/1.log

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-14
      • 2019-02-21
      • 2020-05-08
      • 2017-02-28
      • 2017-10-20
      • 2021-04-17
      • 1970-01-01
      相关资源
      最近更新 更多