Hitesh Roy
Hitesh Roy

Reputation: 337

web server of airflow is not running

m configuring email scheduler in Airflow in Django but its not working.

error in terminal:

airflow webserver
[2017-12-29 10:52:17,614] {__init__.py:57} INFO - Using executor SequentialExecutor
[2017-12-29 10:52:17,734] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python3.5/lib2to3/Grammar.txt
[2017-12-29 10:52:17,765] {driver.py:120} INFO - Generating grammar tables from /usr/lib/python3.5/lib2to3/PatternGrammar.txt
  ____________       _____________
 ____    |__( )_________  __/__  /________      __
____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/

/usr/local/lib/python3.5/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
  .format(x=modname), ExtDeprecationWarning
[2017-12-29 10:52:18,354] [8169] {models.py:167} INFO - Filling up the DagBag from /home/hitesh/airflow/dags
Running the Gunicorn Server with:
Workers: 4 sync
Host: 0.0.0.0:8080
Timeout: 120
Logfiles: - -
=================================================================            

Error: 'airflow.www.gunicorn_config' doesn't exist

Upvotes: 5

Views: 15379

Answers (5)

BorderStark
BorderStark

Reputation: 141

Steps to solve the issue:

  • Install guinicorn 19.9.0
  • Run:

    whereis gunicorn

  • Replace the /usr/bin/gunicorn with a softlink to the recently istalled, in my case:

    [airflow@foo airflow]$ sudo mv /usr/bin/gunicorn /usr/bin/gunicorn_old [airflow@foo airflow]$ sudo ln -s /opt/anaconda3.5/bin/gunicorn /usr/bin/gunicorn [airflow@foo airflow]$ /opt/anaconda3.5/bin/gunicorn --version gunicorn (version 19.9.0)

  • Start airflow webserver pointing to the 1.10.0, in my case:

    nohup /opt/anaconda3.5/bin/airflow webserver & nohup /opt/anaconda3.5/bin/airflow scheduler &

This will fix the issue if:

  1. whereis guicorn shows different values
  2. Linux guicorn executable file is different that the version installed in airflow installation.

Hope this helps

Upvotes: 0

Old Panda
Old Panda

Reputation: 1616

I'm not using Django but encountered the same issue. I got it resolved by applying the changes at this pr on airflow source code. That is, to replace the command gunicorn with its absolute path.

I'm under Python 3.6.0, airflow 1.10.0, and gunicorn 19.9.0. Hope this helps.

Upvotes: 0

enoted
enoted

Reputation: 616

Try running sudo airflow webserver instead of airflow webserver. It helped me with this issue.

Upvotes: 2

ketankk
ketankk

Reputation: 2664

Reinstall package using sudo pip install airflow==1.8

It will resolve packages issue.

Upvotes: -1

x97Core
x97Core

Reputation: 1514

Airflow (tested v1.8.0) doesn't work with gunicorn 19.4+ for the reasons described here: http://mail-archives.apache.org/mod_mbox/airflow-commits/201708.mbox/%3CJIRA.13063358.1491960900000.100006.1501939203227@Atlassian.JIRA%3E

It should work once you downgrade gunicorn with this command pip install gunicorn==19.3.0

Upvotes: 7

Related Questions