气流的Web服务器没有运行

时间:2017-12-29 05:27:20

标签: django python-3.x apache-airflow airflow-scheduler

在Django中配置Airflow中的电子邮件调度程序,但它无法正常工作。

终端

错误

airflow webserver
[2017-12-29 10:52:17,614] {__init__.py:57} INFO - Using executor SequentialExecutor
[2017-12-29 10:52:17,734] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python3.5/lib2to3/Grammar.txt
[2017-12-29 10:52:17,765] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python3.5/lib2to3/PatternGrammar.txt
  ____________       _____________
 ____    |__( )_________  __/__  /________      __
____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/

/usr/local/lib/python3.5/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
[2017-12-29 10:52:18,354] [8169] {models.py:167} INFO - Filling up the DagBag from /home/hitesh/airflow/dags
Running the Gunicorn Server with:
Workers: 4 sync
Host: 0.0.0.0:8080
Timeout: 120
Logfiles: - -
=================================================================            

Error: 'airflow.www.gunicorn_config' doesn't exist

5 个答案:

答案 0 :(得分:7)

Airflow(经过测试的v1.8.0)与gunicorn 19.4+不兼容,原因如下: http://mail-archives.apache.org/mod_mbox/airflow-commits/201708.mbox/%3CJIRA.13063358.1491960900000.100006.1501939203227@Atlassian.JIRA%3E

使用此命令pip install gunicorn==19.3.0

降级gunicorn后,它应该可以正常工作

答案 1 :(得分:2)

尝试运行sudo airflow webserver而不是airflow webserver。它帮助我解决了这个问题。

答案 2 :(得分:0)

使用sudo pip install airflow==1.8

重新安装软件包

它将解决软件包问题。

答案 3 :(得分:0)

我没有使用Django,但遇到了相同的问题。通过在气流源代码上对此pr应用更改来解决此问题。也就是说,将命令gunicorn替换为其绝对路径。

我在Python 3.6.0airflow 1.10.0gunicorn 19.9.0下。希望这会有所帮助。

答案 4 :(得分:0)

解决问题的步骤:

  • 安装guinicorn 19.9.0
  • 运行:

    枪杀哪里

  • 用一个软链接替换/ usr / bin / gunicorn到最近被重置的版本,在我的情况下:

    [airflow@foo airflow]$ sudo mv /usr/bin/gunicorn /usr/bin/gunicorn_old [airflow@foo airflow]$ sudo ln -s /opt/anaconda3.5/bin/gunicorn /usr/bin/gunicorn [airflow@foo airflow]$ /opt/anaconda3.5/bin/gunicorn --version gunicorn (version 19.9.0)

  • 在我的情况下,启动指向1.10.0的气流Web服务器:

    nohup /opt/anaconda3.5/bin/airflow webserver & nohup /opt/anaconda3.5/bin/airflow scheduler &

在以下情况下,此问题可以解决:

  1. guicorn的位置显示不同的值
  2. Linux guicorn可执行文件与版本不同 安装在气流安装中。

希望这会有所帮助