Airflow webserver No module named 'airflow.www.fab_security'
Asked Answered
J

0

7

I am running Airflow 1.10.12 on Ubuntu. Airflow was running fine using local executor and MySql. In order to conduct some tests, I have moved to Celery executer with RabbitMQ. Based on a tutorial, here is my config file:

[core]
executor = CeleryExecutor
[celery]
broker_url = pyamqp://rabbitmq:rabbitmq@localhost/
result_backend = db+mysql+pymysql://airflow:airflow@localhost:3306/airflow_db

But when I run:

airflow webserver

The following error is thrown:

Traceback (most recent call last):
  File "/usr/local/bin/airflow", line 37, in <module>
    args.func(args)
  File "/usr/local/lib/python3.8/dist-packages/airflow/utils/cli.py", line 76, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/airflow/bin/cli.py", line 1076, in webserver
    app = cached_app_rbac(None) if settings.RBAC else cached_app(None)
  File "/usr/local/lib/python3.8/dist-packages/airflow/www_rbac/app.py", line 300, in cached_app
    app, _ = create_app(config, session, testing)
  File "/usr/local/lib/python3.8/dist-packages/airflow/www_rbac/app.py", line 65, in create_app
    app.config.from_pyfile(settings.WEBSERVER_CONFIG, silent=True)
  File "/usr/local/lib/python3.8/dist-packages/flask/config.py", line 132, in from_pyfile
    exec(compile(config_file.read(), filename, "exec"), d.__dict__)
  File "/home/helia/airflow/webserver_config.py", line 21, in <module>
    from airflow.www.fab_security.manager import AUTH_DB
ModuleNotFoundError: No module named 'airflow.www.fab_security'
Jon answered 17/10, 2021 at 17:50 Comment(3)
setting rbac = True in airflow.cfg probably solved the issueJon
Were you able to resolve this? I am facing a similar issueCalpe
@Calpe I am not sure what finally solved the issue actually :|Jon

© 2022 - 2024 — McMap. All rights reserved.