2016-10-18 6 views
0

Airflow Webserver nur im Debug-ModusAirflow Webserver nur im Debug-Modus

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 

Aber airflow webserver -p 8051 -d arbeitet starten starten

[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 

Auch kann ich airflow-webserver.pid Datei in $AIRFLOW_HOME

nicht sehen Aber in Debug-Modus Ich kann nicht laufen 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 

Antwort

0

Nach dem Lesen durch den Quellcode cli.py (siehe webserver und setup_locations Funktionen). Ich würde vermuten, dass Sie keinen Zugriff auf die Dateien haben, die beim Start des Gunicorn-Prozesses eingerichtet werden. Stellen Sie sicher, dass Sie Schreibzugriff auf AIRFLOW_HOME haben. Wenn Sie den von Ihnen exportierten Verzeichniswert nicht ändern, ändern Sie die Berechtigungen für das Verzeichnis, sodass Airflow dort schreiben kann.