skip to Main Content

I realise this is a duplicate of thousands of posts across the internet, but I have only found solutions for version <2.0, and those solutions do not apply to >2.0.

Basically, I have installed Apache Airflow on an Ubuntu system. Everything installed fine, as far as I see from command line, and I first create a user:

airflow users  create --role Admin --username admin --email admin --firstname admin --lastname admin --password admin

And then from here I start up the webserver and scheduler:

airflow webserver -p 8585 > ${AIRFLOW_HOME}/logs/webserver.log 2>&1 &
airflow scheduler > ${AIRFLOW_HOME}/logs/scheduler.log 2>&1 &

And then I can access the webserver via "http://<HOST_IP>:8585" – This loads to the log in screen no problem.

But when I try to log in using the user details initially created, or by using my OS user (on the off-chance), it just fails with "Invalid login." I’ve tried restarting the webserver and Ubuntu to no avail.

I’ve used Airflow <2.0 in the past and never even created a user and just logged in straight away, so I’m really blank on what the answer is here. I absolutely hate Airflow and am loosing my mind just trying to log in, so a massive thanks for any help!

2

Answers


  1. Chosen as BEST ANSWER

    Okay, sooo I managed to get it running with login potential. I think I've discovered the issue, at least, and can re-create the problem, though frankly I have ZERO idea why it IS an issue (software coded issue??).

    Basically, I had to run the install processes above as ROOT user. I was trying to run it as my admin user, but it kept resulting in the log in issue above - I did notice however that all install guides appear to use the ROOT user, so I gave it a shot in case it was as annoyingly simple as that, and VOILA!! First time logged in.

    I did stop the software running at this point, quickly restart it as my admin user and immediately got the same login issue. There's something odd going on here, and I don't know what it is, but when in doubt: Try ROOT.


  2. Solution- Create user again

    I ran into the same issue. I had created an Admin user using the same command and after some changes to my config file, I ran airflow db init. After this when I started the webserver, I tried logging in with my admin credentials, but no luck. When I checked the logs, it showed me –

    WARNING – No user yet created, use flask fab command to do it.

    So I created the user again and it worked.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search