Getting the following error when upgrading aap 2.4 to aap 2.5
TASK [ansible.automation_platform_installer.automationgateway : Migrate the gateway database schema] ***
fatal: [10.204.16.18]: FAILED! => {“changed”: true, “cmd”: “aap-gateway-manage migrate”, “delta”: “0:00:01.093896”, “end”: “2025-01-16 11:39:29.686047”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2025-01-16 11:39:28.592151”, “stderr”: “Traceback (most recent call last):\n File "/bin/aap-gateway-manage", line 8, in \n sys.exit(manage())\n ^^^^^^^^\n File "/usr/lib/python3.11/site-packages/aap_gateway_api/init.py", line 22, in manage\n execute_from_command_line(sys.argv)\n File "/usr/lib/python3.11/site-packages/django/core/management/init.py", line 442, in execute_from_command_line\n utility.execute()\n File "/usr/lib/python3.11/site-packages/django/core/management/init.py", line 416, in execute\n django.setup()\n File "/usr/lib/python3.11/site-packages/django/init.py", line 24, in setup\n apps.populate(settings.INSTALLED_APPS)\n File "/usr/lib/python3.11/site-packages/django/apps/registry.py", line 124, in populate\n app_config.ready()\n File "/usr/lib/python3.11/site-packages/aap_gateway_api/apps.py", line 42, in ready\n import aap_gateway_api.signals # noqa 401\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.11/site-packages/aap_gateway_api/signals/init.py", line 1, in \n from aap_gateway_api.signals.user import user_logged_out # noqa: 401\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.11/site-packages/aap_gateway_api/signals/user.py", line 3, in \n from ansible_base.lib.utils.requests import get_remote_host\n File "/usr/lib/python3.11/site-packages/ansible_base/lib/utils/requests.py", line 7, in \n from ansible_base.jwt_consumer.common.util import validate_x_trusted_proxy_header\n File "/usr/lib/python3.11/site-packages/ansible_base/jwt_consumer/common/util.py", line 9, in \n from ansible_base.jwt_consumer.common.cert import JWTCert, JWTCertException\n File "/usr/lib/python3.11/site-packages/ansible_base/jwt_consumer/common/cert.py", line 7, in \n from ansible_base.jwt_consumer.common.cache import JWTCache\n File "/usr/lib/python3.11/site-packages/ansible_base/jwt_consumer/common/cache.py", line 14, in \n cache = caches[jwt_cache_name]\n ~~~~~~^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.11/site-packages/django/utils/connection.py", line 62, in getitem\n conn = self.create_connection(alias)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.11/site-packages/django/core/cache/init.py", line 52, in create_connection\n return backend_cls(location, params)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/lib/python3.11/site-packages/ansible_base/lib/cache/fallback_cache.py", line 44, in init\n self._temp_file.unlink()\n File "/usr/lib64/python3.11/pathlib.py", line 1147, in unlink\n os.unlink(self)\nPermissionError: [Errno 1] Operation not permitted: ‘/tmp/gw_primary_cache_failed’”, “stderr_lines”: [“Traceback (most recent call last):”, " File "/bin/aap-gateway-manage", line 8, in “, " sys.exit(manage())”, " ^^^^^^^^“, " File "/usr/lib/python3.11/site-packages/aap_gateway_api/init.py", line 22, in manage”, " execute_from_command_line(sys.argv)“, " File "/usr/lib/python3.11/site-packages/django/core/management/init.py", line 442, in execute_from_command_line”, " utility.execute()“, " File "/usr/lib/python3.11/site-packages/django/core/management/init.py", line 416, in execute”, " django.setup()“, " File "/usr/lib/python3.11/site-packages/django/init.py", line 24, in setup”, " apps.populate(settings.INSTALLED_APPS)“, " File "/usr/lib/python3.11/site-packages/django/apps/registry.py", line 124, in populate”, " app_config.ready()“, " File "/usr/lib/python3.11/site-packages/aap_gateway_api/apps.py", line 42, in ready”, " import aap_gateway_api.signals # noqa 401", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^“, " File "/usr/lib/python3.11/site-packages/aap_gateway_api/signals/init.py", line 1, in ”, " from aap_gateway_api.signals.user import user_logged_out # noqa: 401", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^“, " File "/usr/lib/python3.11/site-packages/aap_gateway_api/signals/user.py", line 3, in ”, " from ansible_base.lib.utils.requests import get_remote_host", " File "/usr/lib/python3.11/site-packages/ansible_base/lib/utils/requests.py", line 7, in “, " from ansible_base.jwt_consumer.common.util import validate_x_trusted_proxy_header”, " File "/usr/lib/python3.11/site-packages/ansible_base/jwt_consumer/common/util.py", line 9, in “, " from ansible_base.jwt_consumer.common.cert import JWTCert, JWTCertException”, " File "/usr/lib/python3.11/site-packages/ansible_base/jwt_consumer/common/cert.py", line 7, in “, " from ansible_base.jwt_consumer.common.cache import JWTCache”, " File "/usr/lib/python3.11/site-packages/ansible_base/jwt_consumer/common/cache.py", line 14, in “, " cache = caches[jwt_cache_name]”, " ~~~~~~^^^^^^^^^^^^^^^^“, " File "/usr/lib/python3.11/site-packages/django/utils/connection.py", line 62, in getitem”, " conn = self.create_connection(alias)“, " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^”, " File "/usr/lib/python3.11/site-packages/django/core/cache/init.py", line 52, in create_connection", " return backend_cls(location, params)“, " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^”, " File "/usr/lib/python3.11/site-packages/ansible_base/lib/cache/fallback_cache.py", line 44, in init", " self._temp_file.unlink()“, " File "/usr/lib64/python3.11/pathlib.py", line 1147, in unlink”, " os.unlink(self)", “PermissionError: [Errno 1] Operation not permitted: ‘/tmp/gw_primary_cache_failed’”], “stdout”: “”, “stdout_lines”: }
This is my inventory:
[automationgateway]
10.204.16.18 ansible_user=ec2-user ansible_ssh_private_key_file=~/.ssh/key.pem
[automationcontroller]
10.204.16.11 ansible_user=ec2-user ansible_ssh_private_key_file=~/.ssh/key.pem
[automationhub]
10.204.16.16 ansible_user=ec2-user ansible_ssh_private_key_file=~/.ssh/key.pem
[database]
10.204.16.17 ansible_user=ec2-user ansible_ssh_private_key_file=~/.ssh/key.pem
[all:vars]
admin_password=‘…’
Postgresql
pg_host=‘10.204.16.17’
pg_port=‘5432’
pg_database=‘awx’
pg_username=‘awx’
pg_password=‘…’
pg_sslmode=‘prefer’
Redis
redis_mode=standalone
Common variables
registry_url=‘registry.redhat.io’
registry_username=‘’
registry_password=‘’
AAP Automation Hub
automationhub_admin_password=‘…’
automationhub_pg_host=‘10.204.16.17’
automationhub_pg_port=‘5432’
automationhub_pg_database=‘awx’
automationhub_pg_username=‘awx’
automationhub_pg_password='…
automationhub_pg_sslmode=‘prefer’
Automation Gateway configuration
automationgateway_admin_password=‘…’
automationgateway_pg_host=‘10.204.16.17’
automationgateway_pg_port=5432
automationgateway_pg_database=‘automationgateway’
automationgateway_pg_username=‘awx’
automationgateway_pg_password=‘…’
automationgateway_pg_sslmode=‘prefer’
automationgateway_disable_https=true