1

I started the Airflow with Postgres as the backend database. The web-servers is started successfully, but when I trying to create the user using the create_user command and full CLI as follow

airflow create_user -r Admin -u admin -e admin@acme.com -f admin -l user -p Password

This CLI is giving an error and it looks like airflow is still looking for SQLite. Full logs as follow

ravi@ravi:~/Desktop/test$ docker exec -it airflow_airflow_webserver_1 sh
$ airflow create_user -r Admin -u admin -e admin@acme.com -f admin -l user -p Pass@123
/home/airflow/.local/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:813: UserWarning: Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. Defaulting SQLALCHEMY_DATABASE_URI to "sqlite:///:memory:".
  'Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. '
[2020-12-08 11:19:30,734] {manager.py:96} ERROR - DB Creation and initialization failed: Invalid argument(s) 'pool_size','max_overflow' sent to create_engine(), using configuration SQLiteDialect_pysqlite/StaticPool/Engine.  Please check that the keyword arguments are appropriate for this combination of components.
Ravindra Gupta
  • 1,256
  • 12
  • 42

1 Answers1

3

The bug is fixed by setting the following in airflow.cfg ref

[webserver]
rbac = True
Ravindra Gupta
  • 1,256
  • 12
  • 42
  • 1
    This is not a bug. In Airflow 1.10.X the default mode is the non-RBAC. This is a setting you need to activate as you already figured out – Elad Kalif Dec 08 '20 at 15:01