Skip to content

[FAQ] #260

@Gilliography

Description

@Gilliography

Course

data-engineering-zoomcamp

Question

Why am I getting “Invalid login” or missing users in Airflow?

Answer

This usually happens when the Airflow database is not initialized correctly.

Fix

Run the following command inside your container:

docker exec -it weather-dag-airflow-1 airflow db init

then paste this code:

docker exec -it weather-dag-airflow-1 airflow users create
--username admin
--password admin
--firstname admin
--lastname user
--role Admin
--email admin@example.com

After this, type exit and press enter.
You're done the username and password will be admin as shown above

Checklist

  • I have searched existing FAQs and this question is not already answered
  • The answer provides accurate, helpful information
  • I have included any relevant code examples or links

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions