示例DAG陷入了“运行”状态。无限期陈述 [英] Example DAG gets stuck in "running" state indefinitely

查看:231
本文介绍了示例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陷入了“运行”状态。无限期陈述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆