0

在 AWS EC2 实例中安装气流包后,我正在尝试启动气流网络服务器它显示权限被拒绝问题,我没有得到它试图创建/修改哪个文件或文件夹来得到这个错误。

[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()']
4

2 回答 2

2

我有同样的问题。当我在 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
于 2017-07-07T09:51:52.717 回答
1

我有同样的问题,现有的答案对我不起作用,因为用户没有 sudo 权限。对我有用的是将 bin 添加到路径中:

export PATH=$PATH:/usr/local/bin

或者在我的情况下:

export PATH=$PATH:~/.local/bin

然后我可以运行:

airflow webserver -p 8080

代替:

.local/bin/airflow webserver -p 8080
于 2020-09-17T22:49:44.907 回答