Ravindra Gupta
Ravindra Gupta

Reputation: 1414

Unable to create user in airflow

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 [email protected] -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 [email protected] -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.

Upvotes: 1

Views: 2073

Answers (1)

Ravindra Gupta
Ravindra Gupta

Reputation: 1414

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

[webserver]
rbac = True

Upvotes: 3

Related Questions