airflowairflow-schedulerairflow-2.xairflow-webserver

Apache Airflow Webserver Log In Failed


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!


Solution

  • 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.