Unable to start Airflow Server - OSError: [Errno 2] No such file or directory

Viewed 1408

I setup Airflow locally using the Installation and Quickstart pages.

I was able to originally get it up and running, and even follow the Tutorial.

Then when trying my own example which required the following

pip install 'apache-airflow[gcp,google_auth]'

When I try to run webserver with airflow webserver -p 8080 I get the following error:

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 37, in <module>
    args.func(args)
  File "/Library/Python/2.7/site-packages/airflow/utils/cli.py", line 75, in wrapper
    return f(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/airflow/bin/cli.py", line 996, in webserver
    gunicorn_master_proc = subprocess.Popen(run_args, close_fds=True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
2 Answers

I was able to get passed this, though not entirely sure of the root cause.

I reinstalled python with brew reinstall python2 and notices there were some conflicts I had to force it to overwrite. Once I got passed this, airflow webserver -p 8080 runs without a problem.

On mac I tried sudo pip install gunicorn and it started working.

Related