python – 除了在调试模式下,Airflow webserver才会启动

Airflow webserver仅在调试模式下启动:

airflow webserver -p 8051

我得到的追溯:

[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`

但气流网络服务器-p 8051 -d的工作原理

另外,我在$AIRFLOW_HOME中看不到airflow-webserver.pid文件

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

最佳答案 似乎没有正确安装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上运行web服务器. No此文件或目录异常可能表示气流正在尝试运行gunicorn但无法在PATH上找到它.要进行验证,请尝试从用于启动气流过程的同一目录中的终端运行gunicorn.您还可以查看您正在使用的python环境的bin目录.如果那里没有可执行的gunicorn,你就诊断出了你的问题.

尝试卸载并重新安装gunicorn软件包.

点赞