Airflow webserver仅在调试模式下启动

时间:2016-10-18 15:47:31

标签: airflow

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

airflow webserver -p 8051

[2016-10-18 18:41:13,816] {__init__.py:36} INFO - Using executor CeleryExecutor
  ____________       _____________
 ____    |__( )_________  __/__  /________      __
____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/

[2016-10-18 18:41:14,081] {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有效

[2016-10-18 18:45:45,750] {__init__.py:36} INFO - Using executor CeleryExecutor
  ____________       _____________
 ____    |__( )_________  __/__  /________      __
____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/

[2016-10-18 18:45:46,019] {models.py:154} INFO - Filling up the DagBag from /home/user/some_dir/airflow/dags
Starting the web server on port 8051 and host 0.0.0.0.
[2016-10-18 18:45:46,138] {_internal.py:87} INFO -  * Running on http://0.0.0.0:8051/ (Press CTRL+C to quit)
[2016-10-18 18:45:46,139] {_internal.py:87} INFO -  * Restarting with stat
[2016-10-18 18:45:46,417] {__init__.py:36} INFO - Using executor CeleryExecutor
  ____________       _____________
 ____    |__( )_________  __/__  /________      __
____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/

[2016-10-18 18:45:46,682] {models.py:154} INFO - Filling up the DagBag from /home/user/some_dir/airflow/dags
Starting the web server on port 8051 and host 0.0.0.0.
[2016-10-18 18:45:46,796] {_internal.py:87} WARNING -  * Debugger is active!
[2016-10-18 18:45:46,850] {_internal.py:87} INFO -  * Debugger pin code: 231-950-074

此外,我在airflow-webserver.pid

中看不到$AIRFLOW_HOME个文件

但在调试模式下,我无法运行airflow worker

airflow worker

[2016-10-18 18:48:28,541] {__init__.py:36} INFO - Using executor CeleryExecutor
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 519, in worker
    sp = subprocess.Popen(['airflow', 'serve_logs'], env=env)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

1 个答案:

答案 0 :(得分:0)

阅读cli.py的源代码后(请参阅customer_id | acct1_bal | acct_1_del | acct2_bal | acct_2_del | acct3_bal | acct_3_del | 123 | 1000 | 10 | 2000 | 20 | 3000 | 30 | 456 | 4000 | 40 | 5000 | 50 | NaN | NaN | 789 | NaN | NaN | NaN | NaN | 6000 | 60 | 888 | 7000 | NaN | NaN | 70 | NaN | NaN | 999 | NaN | NaN | NaN | NaN | NaN | NaN | webserver函数)。我猜你无权创建在gunicorn进程启动时设置的文件。确保您具有AIRFLOW_HOME的写入权限。如果您没有更改已导出的目录值,或者更改目录上的权限,以便Airflow可以在那里写入。

相关问题