【问题标题】:Airflow webserver doesnt start except in debug mode气流网络服务器不启动,除非在调试模式下
【发布时间】:2017-04-22 02:59:03
【问题描述】:

Airflow 网络服务器仅在调试模式下启动:

airflow webserver -p 8051

我得到了traceback

[2016-12-07 03:38:48,056] {__init__.py:36} INFO - Using executor CeleryExecutor
[2016-12-07 03:38:48,056] {models.py:154} INFO - Filling up the DagBag from  /home/user/some_dir/airflow/dags. Running the Gunicorn server with 4 syncworkers on host 0.0.0.0 and port 8051 with a timeout of 120... 
['gunicorn', '-w 4', '-k sync', '-t 120', '-b 0.0.0.0:8051', '-n airflow-  webserver', '-p /home/user/some_dir/airflow/airflow-webserver.pid', 'airflow.www.app:cached_app()']
Traceback (most recent call last):
File "./airflow", line 15, in <module> args.func(args)
File "/home/user/userenv/local/lib/python2.7/site-packages/airflow/bin/cli.py", line 426, in webserver 'gunicorn', run_args
File "/home/user/userenv/lib/python2.7/os.py", line 344, in execvp
_execvpe(file, args) File "/home/user/userenv/lib/python2.7/os.py", line 380, in _execvpe func(fullname, *argrest)
OSError: [Errno 2] No such file or directory`

但是airflow webserver -p 8051 -d 有效

我在$AIRFLOW_HOME 中也看不到airflow-webserver.pid 文件

但在调试模式下我无法运行气流工作者

【问题讨论】:

    标签: python python-2.7 pip airflow


    【解决方案1】:

    gunicorn 似乎没有正确安装或在运行气流过程的PATH 上不存在。

    您没有指定正在运行的 Airflow 版本,而是 here is an excerpt from the master branch that shows how running the webserver with and without the debug flag works

    注意在调试模式下运行如何启动烧瓶应用程序。在正常模式下运行在 gunicorn 上运行网络服务器。 No such file or directory 异常可能表明气流正在尝试运行 gunicorn,但在您的 PATH 上找不到它。要验证,请尝试从用于启动气流过程的同一目录中的终端运行gunicorn。您还可以查看您正在使用的 python 环境的bin 目录。如果那里没有 gunicorn 可执行文件,则您已诊断出您的问题。

    尝试卸载并重新安装 gunicorn 包。

    【讨论】:

    • 就我而言,我必须将 gunicorn 从 19.3 升级到 19.4(显然是气流 1.9 所需的版本)。我不确定为什么气流网络服务器在我之前(几天前)启动时似乎工作正常。无论如何,卸载/重新安装(升级)对我来说很成功。
    猜你喜欢
    • 2016-12-28
    • 1970-01-01
    • 1970-01-01
    • 2021-03-06
    • 2018-09-24
    • 2019-09-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多