AAP GUI fails to load and always shows currently upgrading after migrating the AAP to 2.x
Environment
- Red Hat® Ansible Automation Platform 2.x
Issue
-
Ansible Automation Platform page fails to load and GUI always shows below message after upgrading the AAP to 2.x:
"Red Hat Ansible Automation Platform is currently upgrading. This page will refresh when complete."
Resolution
-
Run the following commands to insert the attributes to
django_migrations. Please note the parameters listed can be different based onawx-manage showmigrationscommand output.# echo "insert into django_migrations(app,name,applied) values ('main','0170_node_and_link_state','2023-03-14 18:56:43.45063+00');" | awx-manage dbshell # echo "insert into django_migrations(app,name,applied) values ('main','0171_add_health_check_started','2023-03-14 18:56:43.45063+00');" | awx-manage dbshell -
In above command:
-
main refers to the Django application name within Automation Controller, similarly there are multiple applications for e.g.
auth, conf, sites, taggit. -
name = '0170_node_and_link_state' is the migration name under Django application
main. -
applied = '2023-03-14 18:56:43.45063+00' This timestamp indicates when the migration was applied. This value can be safely replaced with the current date and time.
-
-
Post successful execution of above commands, run
awx-manage migratecommand to make sure that migration is successful.
Root Cause
-
The
awx-manage showmigrationsis incomplete which can be seen by running the same command.[ ] 0170_node_and_link_state [ ] 0171_add_health_check_started -
[X]→ Migration has been successfully applied [ ]→ Migration is pending
Diagnostic Steps
-
The following exception can be seen while running
awx-manage migratecommand from Controller server:[root@automation-controller~]# awx-manage migrate Operations to perform: Apply all migrations: auth, conf, contenttypes, main, oauth2_provider, sessions, sites, social_django, sso, taggit Running migrations: Applying main.0170_node_and_link_state...Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) psycopg2.errors.DuplicateColumn: column "listener_port" of relation "main_instance" already exists -
Following error can be observed under
/var/log/tower/wsrelay.log:2025-12-01 12:29:50,362 INFO [-] awx.main.wsrelay AWX is currently migrating, retry in 10s... 2025-12-01 12:30:05,110 INFO [-] awx.main.wsrelay AWX is currently migrating, retry in 10s... 2025-12-01 12:30:19,763 INFO [-] awx.main.wsrelay AWX is currently migrating, retry in 10s... 2025-12-01 12:30:34,422 INFO [-] awx.main.wsrelay AWX is currently migrating, retry in 10s... 2025-12-01 12:30:47,898 INFO [-] awx.main.wsrelay AWX is currently migrating, retry in 10s...
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments