我已安装了apache-airflow(版本v1.9.0),并附带python 2.7。为了测试是否正确安装,我尝试从浏览器的交互式视图中触发一个教程DAG。界面显示DAG正在运行,但调度器没有显示任何活动。
以下是我尝试的步骤:
- 安装airflow
pip install apache-airflow
安装加密模块以使用 Fernet 密钥进行加密。
pip install apache-airflow[crypto]
生成一个fernet_key并将其添加到airflow.cfg文件中:
from cryptography.fernet import Fernet
fernet_key= Fernet.generate_key()
print(fernet_key)
- 初始化Airflow SQLite数据库
airflow initdb
- 启动 Airflow Web 服务器
airflow webserver -p 8080
- 在新窗口中启动Airflow调度器
airflow scheduler
- 在Airflow页面上触发
tutorial
DAG,网址为localhost:8080
按照这些步骤后,我无法在调度器窗口中看到任何动作,它仍然保持不变。
INFO - Heartbeating the process manager
INFO - Heartbeating the executor
我已经尝试在本地环境和虚拟环境中运行它。我还尝试通过SequentialExecutor
和LocalExecutor
来运行。
即使我尝试通过终端触发任务,也无法触发任务,例如:airflow trigger_dag tutorial
我正在使用Mac OS High Sierra版本10.13.3进行工作。
airflow list_dags
和airflow list_tasks <dag_id>
。 - Mubinairflow test <dag_id> <task_id> 2018-06-06
- Mubin