# AWX Migration from version 17 to version 23.0

**URL:** <https://forum.ansible.com/t/awx-migration-from-version-17-to-version-23-0/2189>\
**Category:** Get Help\
**Tags:** aws, awx, collections\
**Created:** [November 7, 2023, 7:55am UTC](https://forum.ansible.com/t/awx-migration-from-version-17-to-version-23-0/2189 "2023-11-07T07:55:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vajisola](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vajisola](https://forum.ansible.com/u/vajisola)\
**Post date:** [November 7, 2023, 7:55am UTC](https://forum.ansible.com/t/awx-migration-from-version-17-to-version-23-0/2189/1 "2023-11-07T07:55:39Z")

</div>

Hi all, I created a new awx server using  
apiVersion: [awx.ansible.com/v1beta1](http://awx.ansible.com/v1beta1)  
kind: AWX  
metadata:  
name: ansible-awx  
namespace: awx  
spec:  
service\_type: nodeport  
postgres\_storage\_class: gp2

# postgres\_configuration\_secret: ansible-awx-postgres-configurations

secret\_key\_secret: awx-secret-key #old server secret key

After creating the new server. I migrated the old database to the new one using the following commands

1. `kubectl exec -it ansible-awx-postgres-13-0 -- psql -U awx`
2. `\c postgres`
3. `DROP DATABASE awx;`
4. `CREATE DATABASE awx;`
5. `exit`
6. ` kubectl exec -it ansible-awx-postgres-13-0 -- psql -U awx < awx.sql`  
After the migration, i am able to access all the data from the old server in the new server. However, when i launch a template on the new server, i get this error below and i have tried various approach to resolve it, but no luck. I would appreciate if anyone could help.

Traceback (most recent call last):  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/fernet.py”, line 134, in \_verify\_signature  
h.verify(data[-32:])  
cryptography.exceptions.InvalidSignature: Signature did not match digest.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py”, line 512, in run  
env = self.build\_env(self.instance, private\_data\_dir, private\_data\_files=private\_data\_files)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py”, line 1486, in build\_env  
env = injector.build\_env(inventory\_update, env, private\_data\_dir, private\_data\_files)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/models/inventory.py”, line 1462, in build\_env  
injector\_env = self.get\_plugin\_env(inventory\_update, private\_data\_dir, private\_data\_files)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/models/inventory.py”, line 1523, in get\_plugin\_env  
ret = super(ec2, self).get\_plugin\_env(\*args, \*\*kwargs)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/models/inventory.py”, line 1493, in get\_plugin\_env  
env = self.\_get\_shared\_env(inventory\_update, private\_data\_dir, private\_data\_files)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/models/inventory.py”, line 1482, in \_get\_shared\_env  
getattr(builtin\_injectors, cred\_kind)(credential, injected\_env, private\_data\_dir)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/models/credential/injectors.py”, line 14, in aws  
env[‘AWS\_SECRET\_ACCESS\_KEY’] = cred.get\_input(‘password’, default=‘’)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/models/credential/ **init**.py”, line 282, in get\_input  
return decrypt\_field(self, field\_name)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/utils/encryption.py”, line 159, in decrypt\_field  
return smart\_str(decrypt\_value(key, value))  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/utils/encryption.py”, line 136, in decrypt\_value  
value = f.decrypt(encrypted)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/fernet.py”, line 91, in decrypt  
return self.\_decrypt\_data(data, timestamp, time\_info)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/fernet.py”, line 152, in \_decrypt\_data  
self.\_verify\_signature(data)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/fernet.py”, line 136, in \_verify\_signature  
raise InvalidToken  
cryptography.fernet.InvalidToken

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [November 7, 2023, 12:31pm UTC](https://forum.ansible.com/t/awx-migration-from-version-17-to-version-23-0/2189/2 "2023-11-07T12:31:56Z")

</div>

> Signature did not match digest.

This is usually caused by incorrect `SECRET_KEY`.

It seems you’ve specified `secret_key_secret`, so ensure your `/etc/tower/SECRET_KEY` on `awx-task` container in `awx-task` pod matches the old SECRET\_KEY from your old AWX exactly.

> $ kubectl -n awx exec -it deployment/ansible-awx-task -c ansible-awx-task – cat /etc/tower/SECRET\_KEY  
> hGSzP…QzQoB

If this is not correct `SECRET_KEY` for you, your secret `awx-secret-key` is not created correctly, or `awx-task` pod is not restarted after updating the secret.

---

<div class="post-metadata">

**Author:** ![vajisola](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vajisola](https://forum.ansible.com/u/vajisola)\
**Post date:** [November 7, 2023, 7:04pm UTC](https://forum.ansible.com/t/awx-migration-from-version-17-to-version-23-0/2189/3 "2023-11-07T19:04:35Z")

</div>

Thank you so much!! I was actually using the old secret but in base64 encoded format. I had to decode it for it to work for the inventory sync.  
I am now seeing a different issue whilst running the job template. It remains in pending state and shows “This job is not ready to start because there is not enough available capacity.”

---

<div class="post-metadata">

**Author:** ![vajisola](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vajisola](https://forum.ansible.com/u/vajisola)\
**Post date:** [November 7, 2023, 10:42pm UTC](https://forum.ansible.com/t/awx-migration-from-version-17-to-version-23-0/2189/4 "2023-11-07T22:42:47Z")

</div>

I was able to resolve the “This job is not ready to start because there is not enough available capacity.” issue by setting instance group as “Default” in the job templates

---

<div class="post-metadata">

**Author:** ![djyasin](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/djyasin/32/114_2.png) [@djyasin](https://forum.ansible.com/u/djyasin)\
**Post date:** [November 8, 2023, 7:50pm UTC](https://forum.ansible.com/t/awx-migration-from-version-17-to-version-23-0/2189/5 "2023-11-08T19:50:47Z")

</div>

Hi @vajisola,  
We are so happy to see that our community was able to help you! Would you mind selecting one of the responses and marking it as solved? That way this issue will show as resolved and others who may have similar questions can look here for answers.

Thank you so much for being an active member of our community!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [December 8, 2023, 7:51pm UTC](https://forum.ansible.com/t/awx-migration-from-version-17-to-version-23-0/2189/6 "2023-12-08T19:51:08Z")

</div>

Closed on December 8, 2023, 7:51pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
