2016-12-07 53 views
2

氣流Web服務器上啓動僅在調試模式:氣流Web服務器犯規開始,除了在調試模式

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 works

而且我看不到airflow-webserver.pid文件$AIRFLOW_HOME

但在調試模式下無法運行氣流工人

回答

0

看來,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 such file or directory異常可能表示氣流正在嘗試運行gunicorn,但無法在您的PATH上找到它。要進行驗證,請嘗試從與用於啓動氣流過程相同的目錄中的終端運行gunicorn。你也可以看看你正在使用的python環境的bin目錄。如果在那裏沒有gunicorn可執行文件,那麼您已經診斷出您的問題。

嘗試卸載並重新安裝gunicorn軟件包。