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

为什么80%的码农都做不了架构师?>>>   hot3.png

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 
    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

转载于:https://my.oschina.net/aub/blog/1079097

你可能感兴趣的:(airflow 解决安装问题 OSError: [Errno 2] No such file or directory)