airflow 解决安装问题 OSError: [Errno 2] No such file or directory

版权声明:本文为博主原创文章,如需转载,请写明出处, 尊重他人即尊重自己(^_^)。 https://blog.csdn.net/aubdiy/article/details/73930865

airflow 官网地址

http://airflow.apache.org/

系统环境:

  • CentOS release 6.5 (Final)
  • python 2.7.13
  • pip 9.0.1

问题浮现

使用官网 Quick Start 中的方式, 在 root 用户下安装 airflow

export AIRFLOW_HOME=~/airflow
pip install airflow
airflow initdb

以上命令都可以正常执行
当启动 airflow 时

/usr/local/python-2.7.13/bin/airflow webserver

报如下错误

[2017-06-30 09:24:01,609] {__init__.py:57} INFO - Using executor SequentialExecutor
  ____________       _____________
 ____    |__( )_________  __/__  /________      __
____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/

/usr/local/python/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-30 09:24:02,045] [29107] {models.py:167} INFO - Filling up the DagBag from /root/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/python/bin/airflow", line 28, in <module>
    args.func(args)
  File "/usr/local/python/lib/python2.7/site-packages/airflow/bin/cli.py", line 791, in webserver
    gunicorn_master_proc = subprocess.Popen(run_args)
  File "/usr/local/python/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/local/python/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

解决方案

/usr/local/python-2.7.13/bin/ 配置到环境变量中

export PATH=$PATH:/usr/local/python-2.7.13/bin/

再次启动 ariflow , 问题解决。


参考文献:https://issues.apache.org/jira/browse/AIRFLOW-1134

猜你喜欢

转载自blog.csdn.net/aubdiy/article/details/73930865