[ 
https://issues.apache.org/jira/browse/AIRFLOW-878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16723493#comment-16723493
 ] 

ASF GitHub Bot commented on AIRFLOW-878:
----------------------------------------

stale[bot] closed pull request #3134: [AIRFLOW-878] Use absolute gunicorn 
executable location
URL: https://github.com/apache/incubator-airflow/pull/3134
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py
index 449d8ca8da..6046569391 100755
--- a/airflow/bin/cli.py
+++ b/airflow/bin/cli.py
@@ -734,8 +734,17 @@ def webserver(args):
                 
=================================================================\
             '''.format(**locals())))
 
+        def get_gunicorn_location():
+            location = os.path.join(
+                os.path.dirname(sys.executable), "gunicorn")
+            if os.path.isfile(location) and os.access(location, os.X_OK):
+                return location
+            raise AirflowException("gunicorn could not be found")
+
+        gunicorn_exec = get_gunicorn_location()
+
         run_args = [
-            'gunicorn',
+            gunicorn_exec,
             '-w', str(num_workers),
             '-k', str(args.workerclass),
             '-t', str(worker_timeout),


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> FileNotFoundError: 'gunicorn' after initial setup
> -------------------------------------------------
>
>                 Key: AIRFLOW-878
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-878
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: webserver
>            Reporter: Manuel Barkhau
>            Priority: Major
>
> I get the following error after installing airflow and doing {{airflow init}}
> {code}
> $ venv/bin/airflow webserver 
> [2017-02-15 12:24:52,813] {__init__.py:56} INFO - Using executor 
> SequentialExecutor
> [2017-02-15 12:24:52,886] {driver.py:120} INFO - Generating grammar tables 
> from /usr/lib/python3.5/lib2to3/Grammar.txt
> [2017-02-15 12:24:52,904] {driver.py:120} INFO - Generating grammar tables 
> from /usr/lib/python3.5/lib2to3/PatternGrammar.txt
>   ____________       _____________
>  ____    |__( )_________  __/__  /________      __
> ____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
> ___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
>  _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/
>  
> /home/mbarkhau/testproject/venv/lib/python3.5/site-packages/flask/exthook.py:71:
>  ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use 
> flask_cache in
> stead.
>   .format(x=modname), ExtDeprecationWarning
> [2017-02-15 12:24:53,145] [11995] {models.py:167} INFO - Filling up the 
> DagBag from /home/mbarkhau/airflow/dags
> Traceback (most recent call last):
>   File "venv/bin/airflow", line 6, in <module>
>     exec(compile(open(__file__).read(), __file__, 'exec'))
>   File "/home/mbarkhau/testproject/venv/src/airflow/airflow/bin/airflow", 
> line 28, in <module>
>     args.func(args)
>   File "/home/mbarkhau/testproject/venv/src/airflow/airflow/bin/cli.py", line 
> 791, in webserver
>     gunicorn_master_proc = subprocess.Popen(run_args)
>   File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
>     restore_signals, start_new_session)
>   File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
>     raise child_exception_type(errno_num, err_msg)
> FileNotFoundError: [Errno 2] No such file or directory: 'gunicorn'
> Running the Gunicorn Server with:
> Workers: 4 sync
> Host: 0.0.0.0:8080
> Timeout: 120
> Logfiles: - -
> =================================================================            
> {code}
> My setup
> {code}
> $ venv/bin/python --version
> Python 3.5.2
> $ venv/bin/pip freeze | grep airflow
> -e 
> git+ssh://[email protected]/apache/incubator-airflow.git@debc69e2787542cd56ab28b6c48db01c65ad05c4#egg=airflow
> $ uname -a
> Linux mbarkhau-office 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 
> 2017 x86_64 x86_64 x86_64 GNU/Linux
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to