Can't log in to AWX UI

Hi

I just completed installation of AWX 23.0.0, following the instructions in https://github.com/ansible/awx-operator/blob/devel/docs/installation/basic-install.md and in the demo. I can bring up a web browser on the server on which I installed AWX and get the AWX login page. I believe the default username is ‘admin’. But I can’t find a password that works.

I noticed the instructions in https://github.com/ansible/awx-operator/blob/devel/docs/installation/basic-install.md for retrieving awx-demo-admin-password:

kubectl get secret awx-demo-admin-password -o jsonpath=“{.data.password}” | base64 --decode ; echo

but I’m not sure if this is the password needed to log in to the AWX UI.

Help, please.

Thanks

Hi again - anyone know how to determine the login credentials for the AWX browser UI? Thanks!

If that is the name of the instance and you didn’t create the secret, then that is the automatically created admin password that you need to use for the web interface.

Hi

ldpdd042:~ # kubectl get pods -n awx
NAME READY STATUS RESTARTS AGE
awx-demo-postgres-13-0 1/1 Running 2 (9d ago) 10d
awx-demo-task-6d7b6489d-zrcqx 4/4 Running 8 (9d ago) 10d
awx-demo-web-7b96744696-hl4sp 3/3 Running 6 (9d ago) 10d
awx-nginx-postgres-13-0 1/1 Running 1 (9d ago) 9d
awx-nginx-task-678568fc58-mx2ls 4/4 Running 4 (9d ago) 9d
awx-nginx-web-5f9dc6799-hzvjk 3/3 Running 3 (9d ago) 9d
awx-operator-controller-manager-65ddfcbf7d-j4nzf 2/2 Running 22 (36h ago) 10d
ldpdd042:~ # kubectl get secret -n awx awx-demo-admin-password -o jsonpath=“{.data.password}” | base64 --decode ; echo
vIC1WLOVwyChZwrfU9z7aFz8STwQ6pC5
ldpdd042:~ # docker container ls --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0b2695d6d235 gcr.io/k8s-minikube/kicbase:v0.0.40 “/usr/local/bin/entr…” 10 days ago Up 9 days 127.0.0.1:32772->22/tcp, 127.0.0.1:32771->2376/tcp, 127.0.0.1:32770->5000/tcp, 127.0.0.1:32769->8443/tcp, 127.0.0.1:32768->32443/tcp minikube
ldpdd042:~ #

Given this output, it seems that the admin password secret is known. But when I copy and paste this base64-converted value into the ‘password’ field of the AWX UI (using ‘admin’ as the user), I don’t get logged in when I click ‘Log In’, and I don’t see an error message. Is there a log file where I should be logging to diagnose this problem? Thanks!

You can look at the logs via this command provided the pod did get restarted.
kubectl logs awx-demo-web-7b96744696-hl4sp

It might be better to use the above with -f and then try the login again.

Hi

Thanks for the help. Here is the output of the command you mentioned:

ldpdd042:~ # kubectl logs -f -n awx awx-demo-web-7b96744696-hl4sp
[wait-for-migrations] Waiting for database migrations…
[wait-for-migrations] Attempt 1 of 30
[wait-for-migrations] Waiting 0.5 seconds before next attempt
[wait-for-migrations] Attempt 2 of 30
2023-09-06 16:42:06,371 INFO RPC interface ‘supervisor’ initialized
2023-09-06 16:42:06,371 INFO RPC interface ‘supervisor’ initialized
2023-09-06 16:42:06,371 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
2023-09-06 16:42:06,371 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
2023-09-06 16:42:06,371 INFO supervisord started with pid 7
2023-09-06 16:42:06,371 INFO supervisord started with pid 7
2023-09-06 16:42:07,373 INFO spawned: ‘superwatcher’ with pid 35
2023-09-06 16:42:07,373 INFO spawned: ‘superwatcher’ with pid 35
2023-09-06 16:42:07,375 INFO spawned: ‘nginx’ with pid 36
2023-09-06 16:42:07,375 INFO spawned: ‘nginx’ with pid 36
2023-09-06 16:42:07,397 INFO spawned: ‘uwsgi’ with pid 37
2023-09-06 16:42:07,397 INFO spawned: ‘uwsgi’ with pid 37
2023-09-06 16:42:07,409 INFO spawned: ‘daphne’ with pid 38
2023-09-06 16:42:07,409 INFO spawned: ‘daphne’ with pid 38
2023-09-06 16:42:07,417 INFO spawned: ‘awx-cache-clear’ with pid 39
2023-09-06 16:42:07,417 INFO spawned: ‘awx-cache-clear’ with pid 39
2023-09-06 16:42:07,419 INFO spawned: ‘ws-heartbeat’ with pid 40
2023-09-06 16:42:07,419 INFO spawned: ‘ws-heartbeat’ with pid 40
READY
2023-09-06 16:42:08,440 INFO success: superwatcher entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-09-06 16:42:08,440 INFO success: superwatcher entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[uWSGI] getting INI configuration from /etc/tower/uwsgi.ini
*** Starting uWSGI 2.0.21 (64bit) on [Wed Sep 6 16:42:08 2023] ***
compiled with version: 11.4.1 20230605 (Red Hat 11.4.1-2) on 29 August 2023 17:27:10
os: Linux-5.14.21-150400.24.81-default #1 SMP PREEMPT_DYNAMIC Tue Aug 8 14:10:43 UTC 2023 (90a74a8)
nodename: awx-demo-web-7b96744696-hl4sp
machine: x86_64
clock source: unix
detected number of CPU cores: 6
current working directory: /var/lib/awx
detected binary path: /var/lib/awx/venv/awx/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8050 fd 3
Python version: 3.9.17 (main, Aug 9 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x1eca9c0
your server socket listen backlog is limited to 128 connections
your mercy for graceful operations on workers is 60 seconds
mapped 609552 bytes (595 KB) for 5 cores
*** Operational MODE: preforking ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 37)
spawned uWSGI worker 1 (pid: 43, cores: 1)
spawned uWSGI worker 2 (pid: 44, cores: 1)
spawned uWSGI worker 3 (pid: 45, cores: 1)
spawned uWSGI worker 4 (pid: 46, cores: 1)
spawned uWSGI worker 5 (pid: 47, cores: 1)
mounting awx.wsgi:application on /
mounting awx.wsgi:application on /
mounting awx.wsgi:application on /
mounting awx.wsgi:application on /
mounting awx.wsgi:application on /
WSGI app 0 (mountpoint=‘/’) ready in 6 seconds on interpreter 0x1eca9c0 pid: 47 (default app)
WSGI app 0 (mountpoint=‘/’) ready in 13 seconds on interpreter 0x1eca9c0 pid: 46 (default app)
WSGI app 0 (mountpoint=‘/’) ready in 13 seconds on interpreter 0x1eca9c0 pid: 43 (default app)
WSGI app 0 (mountpoint=‘/’) ready in 14 seconds on interpreter 0x1eca9c0 pid: 45 (default app)
WSGI app 0 (mountpoint=‘/’) ready in 14 seconds on interpreter 0x1eca9c0 pid: 44 (default app)
2023-09-06 16:42:23,164 DEBUG cleaning up Redis key b’asgi:group:broadcast-group_send’
2023-09-06 16:42:23,198 INFO [-] daphne.cli Starting server at tcp:port=8051:interface=127.0.0.1
2023-09-06 16:42:23,198 INFO Starting server at tcp:port=8051:interface=127.0.0.1
2023-09-06 16:42:23,199 INFO [-] daphne.server HTTP/2 support not enabled (install the http2 and tls Twisted extras)
2023-09-06 16:42:23,199 INFO HTTP/2 support not enabled (install the http2 and tls Twisted extras)
2023-09-06 16:42:23,199 INFO [-] daphne.server Configuring endpoint tcp:port=8051:interface=127.0.0.1
2023-09-06 16:42:23,199 INFO Configuring endpoint tcp:port=8051:interface=127.0.0.1
2023-09-06 16:42:23,200 INFO [-] daphne.server Listening on TCP address 127.0.0.1:8051
2023-09-06 16:42:23,200 INFO Listening on TCP address 127.0.0.1:8051
2023-09-06 16:42:31,303 INFO [-] awx.main.consumers client ‘specific.5d41bb50d14d4206a61cfe921abc451b!c43ccd1d95ae4b3b9eafad410de076ec’ joined the broadcast group.
2023-09-06 16:42:31,303 INFO [-] awx.main.consumers client ‘specific.5d41bb50d14d4206a61cfe921abc451b!c43ccd1d95ae4b3b9eafad410de076ec’ joined the broadcast group.
2023-09-06 16:42:31,303 INFO client ‘specific.5d41bb50d14d4206a61cfe921abc451b!c43ccd1d95ae4b3b9eafad410de076ec’ joined the broadcast group.
2023-09-06 16:42:38,318 INFO success: nginx entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-09-06 16:42:38,318 INFO success: nginx entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-09-06 16:42:38,318 INFO success: uwsgi entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-09-06 16:42:38,318 INFO success: uwsgi entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-09-06 16:42:38,318 INFO success: daphne entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-09-06 16:42:38,318 INFO success: daphne entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-09-06 16:42:38,318 INFO success: awx-cache-clear entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-09-06 16:42:38,318 INFO success: awx-cache-clear entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-09-06 16:42:38,318 INFO success: ws-heartbeat entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)
2023-09-06 16:42:38,318 INFO success: ws-heartbeat entered RUNNING state, process has stayed up for > than 30 seconds (startsecs)

No output was written to the log when I attempted a login via the AWX UI.

Thoughts?

Thanks
tl

When I used the wrong password, it does return with an error message on the login screen. Do you have a script blocker of some sort running in your browser?

But if you want to reset the admin password, as a troubleshooting step to make sure you have the right one, you can do it in the web pod. exec into the pod and run the following command.

awx-manage changepassword admin

Carl

Hi Carl

Thanks for the suggestion. I tried:

ldpdd042:~ # kubectl get pods -n awx
NAME READY STATUS RESTARTS AGE
awx-demo-postgres-13-0 1/1 Running 2 (14d ago) 14d
awx-demo-task-6d7b6489d-zrcqx 4/4 Running 8 (14d ago) 14d
awx-demo-web-7b96744696-hl4sp 3/3 Running 6 (14d ago) 14d
awx-nginx-postgres-13-0 1/1 Running 1 (14d ago) 14d
awx-nginx-task-678568fc58-mx2ls 4/4 Running 4 (14d ago) 14d
awx-nginx-web-5f9dc6799-hzvjk 3/3 Running 3 (14d ago) 14d
awx-operator-controller-manager-65ddfcbf7d-j4nzf 2/2 Running 29 (2d8h ago) 14d

ldpdd042:~ # kubectl exec -n awx --stdin --tty awx-demo-web-7b96744696-hl4sp – /bin/bash
bash-5.1$ awx-manage changepassword admin
Changing password for user ‘admin’
Password:
Password (again):
Password changed successfully for user ‘admin’
bash-5.1$

When prompted, I entered a password of ‘admin’.

But, when I enter ‘admin’ as the username and password on the ‘Welcome to AWX!’ login page, I sometimes see a message that the username or password is wrong, and sometimes I don’t see any message. I don’t believe there is a pop-up blocker active. in my browser.

Thoughts?

Thanks
tl

which instance of AWX are you attempting to log into? I see awx-nginx and awx-demo

make sure your browser URL is pointing to the proper AWX instance

Do you see any errors in the awx-web container when attempting to login?

In the worst case, you can create a super admin with awx-manage utility, and you can access the AWX UI with this newly created super admin user.
awx-manage util is part of awx-task container

Hi

Thank you both for your replies.

I’ve been following the instructions at https://github.com/ansible/awx-operator/blob/devel/docs/installation/basic-install.md and in the demo to complete a basic AWX installation. I’m not trying anything fancy! I just want to get the default implementation described in the documentation to work.

which instance of AWX are you attempting to log into? I see awx-nginx and awx-demo

The instructions in https://github.com/ansible/awx-operator/blob/devel/docs/installation/basic-install.md create awx-demo, I believe, and the demo instructions (https://asciinema.org/a/416946) create awx-nginx. My understanding is that the basic installation instructions at https://github.com/ansible/awx-operator/blob/devel/docs/installation/basic-install.md are incomplete, as following the instructions does not give you an implementation that includes the AWX UI; please correct me if that isn’t true. So I’m assuming that the awx-nginx instance is where the AWX UI ‘lives’; is that correct?

Thanks
tl

It lives in Web container. Awx-demo Web in your case

Thanks for the reply. In my environment, I see:

ldpdd042:~ # minikube service -n awx awx-demo-service --url
http://192.168.49.2:31829
ldpdd042:~ #

According to https://github.com/ansible/awx-operator/blob/devel/docs/installation/basic-install.md, the default user is ‘admin’ and I can retrieve the password using the command ‘kubectl get secret awx-demo-admin-password -o jsonpath=“{.data.password}” | base64 --decode ; echo’.

I’m running the AWX server in a VM controlled by vSphere. When I connect to the AWX system via the web console, log in as root, and put the url "https:{{FQDN of AWX system}}’ into Firefox, I see the ‘Welcome to AWX’ login page. When I enter ‘admin’ as the username and the password retrieved using the ‘kubectl get secret’ command shown above into the password field, I am not allowed to log in.

What steps do I need to take to log in to the AWX UI?

I’m not even sure which AWX instance is controlling what I’m seeing in Firefox.

thanks
tl

what do you see as the error. Do you have multiple instances of awx running?

To determine how many instances of awx you have running do the following:
kubectl get awx -A

That should list the instances you have running in all namespaces on your infrastructure.
From there you can check to see if you are using node ports or ingress to get to the instances.
It will also give you clues as to which pod you should exec into to change the password.

Thanks for these hints!

ldpdd042:~ # kubectl get awx -A
NAMESPACE NAME AGE
awx awx-demo 20d
awx awx-nginx 20d
default awx-nginx 20d
You have mail in /var/spool/mail/root
ldpdd042:~ #

ldpdd042:~ # kubectl get service -n awx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
awx-demo-postgres-13 ClusterIP None 5432/TCP 20d
awx-demo-service NodePort 10.100.136.234 80:31829/TCP 20d
awx-nginx-postgres-13 ClusterIP None 5432/TCP 20d
awx-nginx-service ClusterIP 10.103.124.182 80/TCP 20d
awx-operator-controller-manager-metrics-service ClusterIP 10.103.12.100 8443/TCP 20d
ldpdd042:~ # kubectl get service -n default
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 443/TCP 20d
ldpdd042:~ #
So I gather that the awx-nginx service is providing the default namespace, and that must be what is used when I connect a browser to this system’s port 443?

Given this, should I be using the command ’ kubectl get secret -n awx awx-demo-admin-password -o jsonpath=“{.data.password}” | base64 --decode ; echo’ to get the password?

Thanks!
tl

If you are going to attempt to logging to the awx-demo instance on nodeport 31829
Then yes.
Though, if you went into the awx-demo-task container and changed the admin password then the secret output is probably wrong.

Hi Larry

Thanks for your help. I finally figured it out. Since the steps in the demo concentrated on creating the awx-nginx instance, and nginx is a web interface, I figured I should be retrieving the password for ‘admin’ from that instance, and not the awx-demo instance, as described in https://github.com/ansible/awx-operator/blob/devel/docs/installation/basic-install.md. So, I used the command:

kubectl get secret -n awx awx-nginx-admin-password -o jsonpath=“{.data.password}” | base64 --decode ; echo

to retrieve the awx-nginx ‘admin’ password, provided this at the AWX login page, and it worked!!! I’m logged in to the AWX UI for the first time.

It would be great if the AWX documentation could be updated to note this.

Thanks again for your patient help!
tl

It looks like that wording for getting the admin password was added.
The last commit for the docs that I could find was a large reorg of docs which was 2023-07-26.
Though the note about the admin password was in the docs prior to the reorg.