示例DAG陷入了“运行”状态。无限期陈述

编程入门 行业动态 更新时间:2024-10-25 08:25:33
本文介绍了示例DAG陷入了“运行”状态。无限期陈述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在我第一次接触气流时,我试图运行安装随附的示例DAGS。这是v.1.8.0。这是我的步骤:

In my first foray into airflow, I am trying to run one of the example DAGS that comes with the installation. This is v.1.8.0. Here are my steps:

$ airflow trigger_dag example_bash_operator [2017-04-19 15:32:38,391] {__init__.py:57} INFO - Using executor SequentialExecutor [2017-04-19 15:32:38,676] {models.py:167} INFO - Filling up the DagBag from /Users/gbenison/software/kludge/airflow/dags [2017-04-19 15:32:38,947] {cli.py:185} INFO - Created <DagRun example_bash_operator @ 2017-04-19 15:32:38: manual__2017-04-19T15:32:38, externally triggered: True> $ airflow dag_state example_bash_operator '2017-04-19 15:32:38' [2017-04-19 15:33:12,918] {__init__.py:57} INFO - Using executor SequentialExecutor [2017-04-19 15:33:13,229] {models.py:167} INFO - Filling up the DagBag from /Users/gbenison/software/kludge/airflow/dags running

尽管快速检查了状态,但dag状态仍运行了很长时间(到现在至少20分钟)。此任务需要几秒钟的时间。我该如何解决?如何查看它停留在哪一步?

The dag state remains "running" for a long time (at least 20 minutes by now), although from a quick inspection of this task it should take a matter of seconds. How can I troubleshoot this? How can I see which step it is stuck on?

推荐答案

要运行任何DAG,您需要确保两个进程正在运行:

To run any DAGs, you need to make sure two processes are running:

  • 气流网络服务器
  • 气流调度程序
  • airflow webserver
  • airflow scheduler

如果您只有个气流Web服务器运行,UI会将DAG显示为正在运行,但如果单击DAG,则实际上没有任何任务在运行 或计划的,而是处于 Null 状态。 这意味着它们正在等待被气流调度器接走。如果 airflow scheduler 没有运行,您将永远处于这种状态,因为任务永远都不会被执行。

If you only have airflow webserver running, the UI will show DAGs as running, but if you click on the DAG, none of it's tasks are actually running or scheduled, but rather in a Null state. What this means is that they are waiting to be picked up by airflow scheduler. If airflow scheduler is not running, you'll be stuck in this state forever, as the tasks are never picked up for execution.

此外,请确保将DAG的DAG视图中的切换按钮切换为 ON。否则,如果您手动触发它,它将不会被调度程序接收。

Additionally, make sure that the toggle button in the DAGs view is switched to 'ON' for the particular DAG. Otherwise it will not get picked up by the scheduler if you trigger it manually.

更多推荐

示例DAG陷入了“运行”状态。无限期陈述

本文发布于:2023-11-23 19:38:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622640.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:示例   状态   DAG

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!