在AWS EC2实例中安装airflow包之后,我正在尝试启动气流网络服务器它显示权限被拒绝的问题,我没有得到它试图创建/修改哪个文件或文件夹来获取此错误。
[root@ip-172-31-62-1 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()']
答案 0 :(得分: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
答案 1 :(得分:0)
我遇到了同样的问题,因为用户没有sudo权限,所以现有答案对我不起作用。对我有用的是在路径中添加bin:
export PATH=$PATH:/usr/local/bin
或者就我而言:
export PATH=$PATH:~/.local/bin
那我就可以跑步:
airflow webserver -p 8080
代替:
.local/bin/airflow webserver -p 8080