0

在AWS EC2實例中安裝airflow包後,我試圖啓動airflow webserver它顯示權限被拒絕的問題,我沒有得到哪個文件或文件夾它試圖創建/修改以獲取此錯誤。airflow webserver -p 8080導致OSError:[Errno 13] Permission denied

[[email protected] airflow]# /usr/local/bin/airflow webserver -p 8080 
[2017-06-13 04:24:35,692] {__init__.py:57} INFO - Using executor SequentialExecutor 

/usr/local/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead. 
    .format(x=modname), ExtDeprecationWarning 
[2017-06-13 04:24:36,093] [4053] {models.py:167} INFO - Filling up the DagBag from /home/ec2-user/airflow/dags 
Running the Gunicorn Server with: 
Workers: 4 sync 
Host: 0.0.0.0:8080 
Timeout: 120 
Logfiles: - - 
================================================================= 

Traceback (most recent call last): 
    File "/usr/local/bin/airflow", line 28, in <module> 
    args.func(args) 
    File "/usr/local/lib/python2.7/site-packages/airflow/bin/cli.py", line 791, in webserver 
    gunicorn_master_proc = subprocess.Popen(run_args) 
    File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ 
    errread, errwrite) 
    File "/usr/lib64/python2.7/subprocess.py", line 1343, in _execute_child 
    raise child_exception 
OSError: [Errno 13] Permission denied 



------------------------------------ 
The Value of run_args in above error message is 
['gunicorn', '-w', '4', '-k', 'sync', '-t', '120', '-b', '0.0.0.0:8080', '-n', 'airflow-webserver', '-p', '/home/ec2-user/airflow/airflow-webserver.pid', '-c', 'airflow.www.gunicorn_config', '--access-logfile', '-', '--error-logfile', '-', 'airflow.www.app:cached_app()'] 

回答

1

我有同樣的問題。當我以sudo模式安裝整個安裝程序時,它得到了解決。請找到我使用的命令:

sudo apt-get update && sudo apt-get -y upgrade 

sudo apt-get install python-pip 

sudo -H pip install airflow 

sudo airflow initdb 

sudo airflow webserver -p 8080 
相關問題