气流 - 没有动摇

时间:2017-11-20 13:51:43

标签: python gcp apache-airflow

python:27

我刚刚在带有mysql后端的新vm GCP上安装了气流。 (sudo pip install apache-airflow和sudo pip install apache-airflow [mysql])

我没有创建任何自己的dag,但试图运行示例来了解它是如何工作的。

我已将配置更改为使用

executor = LocalExecutor

并完成了

export AIRFLOW_HOME=`pwd`/airflow  (in both shells)
airflow initdb

Web服务器启动为" airflow webserver"在一个不同的shell中,我已经开始了#34;气流调度程序"。

我已尝试通过点击" DAG"然后点击运行按钮进入网络ui到stat任务。 (拨号打开,询问我是否要立即运行)

我尝试过的是" example_bash_operator,example_http_operator,example_python_operator",现在它们显示为正在运行。但是国家不会改变。我也点击了,所以3个DAG显示为" on"。

当我去浏览时 - >任务实例并查看应该启动它的第一个实例:

All dependencies are met but the task instance is not running. 
In most cases this just means that the task will probably be scheduled soon unless:
.......

我的服务器没有提供任何有意义的输出。我的调度程序只是输出

[2017-11-20 13:42:37,460] {jobs.py:1407} INFO - Heartbeating the process manager
[2017-11-20 13:42:37,460] {jobs.py:1443} INFO - Heartbeating the executor

1 个答案:

答案 0 :(得分:1)

我知道这有点晚了但我也遇到了同样的问题,因此我希望其他人面临这个问题的答案。

所以问题是因为airflow的调度程序在airflow.cfg中查找由变量dags_folder指定的文件夹中运行的dag。示例dag存储在安装气流库的位置,这就是调度程序没有选择要运行的任何内容的原因。要修复它,只需将airlfow.cfg中dags_folder的值更改为指向包含示例dags的文件夹即可。要查找示例dag文件夹,请从根目录

运行find | grep 'example_bash_operator'