aws-mwaa-local-runner: UI Login doesn't work

Hello,

I followed all the steps in the readme and when I access the login page using the credentials ‘admin’ ‘test’ nothing happens. I try to get to the homepage but I continue to have the login fields

local-runner_1  | 172.18.0.1 - - [26/May/2021:10:35:50 +0000] "POST /login/?next=http%3A%2F%2F127.0.0.1%3A8080%2Fhome HTTP/1.1" 302 209 "http://127.0.0.1:8080/login/?next=http%3A%2F%2F127.0.0.1%3A8080%2Fhome" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
local-runner_1  | 172.18.0.1 - - [26/May/2021:10:35:50 +0000] "GET / HTTP/1.1" 302 217 "http://127.0.0.1:8080/login/?next=http%3A%2F%2F127.0.0.1%3A8080%2Fhome" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
local-runner_1  | 172.18.0.1 - - [26/May/2021:10:35:50 +0000] "GET /home HTTP/1.1" 302 305 "http://127.0.0.1:8080/login/?next=http%3A%2F%2F127.0.0.1%3A8080%2Fhome" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
local-runner_1  | 172.18.0.1 - - [26/May/2021:10:35:51 +0000] "GET /login/?next=http%3A%2F%2F127.0.0.1%3A8080%2Fhome HTTP/1.1" 200 17126 "http://127.0.0.1:8080/login/?next=http%3A%2F%2F127.0.0.1%3A8080%2Fhome" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"

image

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 16
  • Comments: 20 (2 by maintainers)

Commits related to this issue

Most upvoted comments

We were able to resolve this by adding AUTH_ROLE_PUBLIC = "Admin" to docker/config/webserver_config.py

and commenting out airflow users create -r Admin -u admin -e admin@example.com -f admin -l user -p test in docker/script/entrypoint.sh

I have also noticed this. Accessing to http://0.0.0.0:8080 and performing logging operations leaded into an endless forwarding into the logging page.

The stdout logger shows both the successfull logging and the redirection.

  ____________       _____________
 ____    |__( )_________  __/__  /________      __
____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
 _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/
[2021-07-12 08:04:51,397] {{dagbag.py:451}} INFO - Filling up the DagBag from /dev/null
[2021-07-12 08:04:53 +0000] [225] [INFO] Starting gunicorn 19.10.0
[2021-07-12 08:04:53 +0000] [225] [INFO] Listening at: http://0.0.0.0:8080 (225)
[2021-07-12 08:04:53 +0000] [225] [INFO] Using worker: sync
[2021-07-12 08:04:53 +0000] [228] [INFO] Booting worker with pid: 228
[2021-07-12 08:04:53 +0000] [229] [INFO] Booting worker with pid: 229
[2021-07-12 08:04:53 +0000] [230] [INFO] Booting worker with pid: 230
[2021-07-12 08:04:53 +0000] [231] [INFO] Booting worker with pid: 231
172.28.0.1 - - [12/Jul/2021:08:05:09 +0000] "GET / HTTP/1.1" 302 217 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:09 +0000] "GET /home HTTP/1.1" 302 301 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:10 +0000] "GET /login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome HTTP/1.1" 200 16873 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:14 +0000] "POST /login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome HTTP/1.1" 302 209 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:14 +0000] "GET / HTTP/1.1" 302 217 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:14 +0000] "GET /home HTTP/1.1" 302 301 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:14 +0000] "GET /login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome HTTP/1.1" 200 16873 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
[2021-07-12 08:05:24 +0000] [225] [INFO] Handling signal: ttin
[2021-07-12 08:05:24 +0000] [277] [INFO] Booting worker with pid: 277
172.28.0.1 - - [12/Jul/2021:08:05:25 +0000] "GET / HTTP/1.1" 302 217 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:25 +0000] "GET /home HTTP/1.1" 302 301 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:25 +0000] "GET /login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome HTTP/1.1" 200 16873 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
[2021-07-12 08:05:29 +0000] [225] [INFO] Handling signal: ttou
[2021-07-12 08:05:29 +0000] [228] [INFO] Worker exiting (pid: 228)
172.28.0.1 - - [12/Jul/2021:08:05:32 +0000] "POST /login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome HTTP/1.1" 302 209 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:32 +0000] "GET / HTTP/1.1" 302 217 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:32 +0000] "GET /home HTTP/1.1" 302 301 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:32 +0000] "GET /login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome HTTP/1.1" 200 16873 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:37 +0000] "GET / HTTP/1.1" 302 217 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:37 +0000] "GET /home HTTP/1.1" 302 301 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"
172.28.0.1 - - [12/Jul/2021:08:05:37 +0000] "GET /login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome HTTP/1.1" 200 16873 "http://0.0.0.0:8080/login/?next=http%3A%2F%2F0.0.0.0%3A8080%2Fhome" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"

I also noticed this happenened when I had other aws-mwaa-local-runner-webui tab openened in the browser.

Instead of copy pasting the UR http://0.0.0.0:8080 or clicling on the link from stdout, I just went to my browser and typed http://localhost:8080. I have neved had the issue again so far.

This is not much, but hope it helps

I have the same issue, no way to login 😦

same problem… tested with chrome, firefox and Safari

same problem here, seems the page keeps redirecting

Same Issue: image

We were able to resolve this by adding AUTH_ROLE_PUBLIC = "Admin" to docker/config/webserver_config.py

and commenting out airflow users create -r Admin -u admin -e admin@example.com -f admin -l user -p test in docker/script/entrypoint.sh

Working! Thanks! Maybe worth to mention that you need to run ./mwaa-local-env build-image after these changes.

Adding to @subashcanapathy 's point. The below steps worked for me on an ec2 instance.

Via local port forwarding (you don’t need the proxy):

Setup tunnel + local port forwarding ssh -i "/path/to/pem" user@ec2-dns -L 8157:ec2-dns:8080

Once the image is built with ./mwaa-local-env build-image, run below ./mwaa-local-env start

Access the UI http://localhost:8157/