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 
相关问题