我正在运行Apache Airflow版本1.9.0,当我尝试从UI运行任务时,我在气流调度程序控制台中收到以下错误:
[2018-05-08 12:09:06,737] {jobs.py:1077} INFO - No tasks to consider for execution.
[2018-05-08 12:09:06,738] {jobs.py:1662} INFO - Heartbeating the executor
[2018-05-08 12:09:06,738] {celery_executor.py:101} ERROR - Error syncing the celery executor, ignoring it:
[2018-05-08 12:09:06,738] {celery_executor.py:102} ERROR - No result backend configured. Please see the documentation for more information.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/airflow/executors/celery_executor.py", line 83, in sync
state = async.state
File "/usr/local/lib/python2.7/dist-packages/celery/result.py", line 329, in state
return self.backend.get_status(self.id)
File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 547, in _is_disabled
'No result backend configured. '
NotImplementedError: No result backend configured. Please see the documentation for more information.
在我的airflow.cfg中,我在[celery]部分中有以下变量:
celery_app_name = airflow.executors.celery_executor
celeryd_concurrency = 16
worker_log_server_port = 8795
broker_url = amqp://guest:guest@localhost:5672//
celery_result_backend = amqp://guest:guest@localhost:5672//
flower_host = 0.0.0.0
flower_port = 5555
default_queue = default
我在这里做错了什么?
答案 0 :(得分:1)
你不应该将celery_result_backend
指向RabbitMQ实例,因为这个后端的目的是存储有关任务状态的信息,而RabbitMQ不是正确的工具(请纠正我,如果我'我错了。)
如果你想继续使用与经纪人和后端相同的实例,你可以使用Redis,或者你可以使用postgres作为我推荐的后端。 Postgres的示例配置如下:
celery_result_backend = db+postgresql://airflow:****@postgres/airflow
有关官方文档的更多信息:Here