# AWX Applications - Internal server error

**URL:** <https://forum.ansible.com/t/awx-applications-internal-server-error/37133>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [September 21, 2022, 10:15am UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133 "2022-09-21T10:15:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 21, 2022, 10:15am UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/1 "2022-09-21T10:15:55Z")

</div>

Hello,  
I’ve deployed in my aks cluster AWX with awx-operator 0.28.0

It’s not a clean installation, I’m using a db from a previous AWX version (quite old version).

When I click on Application menù I receive an internal server error:

 ![err.PNG](https://us1.discourse-cdn.com/ansible/original/2X/c/c8e153d78fb97f7fe0ebe124e0657ac11ab60967.png)

> From container “awx-web” I see this log error:  
> **_2022-09-21 10:08:28,819 ERROR [2f9c4cc6f70d45b4af66e8983b5f0624] django.request Internal Server Error: /api/v2/applications/_**  
> **_Traceback (most recent call last):_**  
> **_File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/fernet.py”, line 120, in \_verify\_signature_**  
> **_h.verify(data[-32:])_**  
> **_File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/hazmat/primitives/hmac.py”, line 69, in verify_**  
> **_ctx.verify(signature)_**  
> **_File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cryptography/hazmat/backends/openssl/hmac.py”, line 76, in verify_**  
> **_raise InvalidSignature(“Signature did not match digest.”)_**  
> **_cryptography.exceptions.InvalidSignature: Signature did not match digest._**

Is it possible that some tables as old data with a different signature? Can I clean this tables and re-insert data with new AWX version?

Thank you,  
Elia

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 21, 2022, 1:03pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/2 "2022-09-21T13:03:51Z")

</div>

Hi Elia

Have you set the awx-secret-key as it was on your old environment?

It must be the same as far as I have discovered.  
When I import data from an old environment in a new environment I have to edit that secret key.

Regards Hans

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 21, 2022, 1:25pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/3 "2022-09-21T13:25:04Z")

</div>

Hi Hans,  
no I haven’t set the “awx-secret-key” as it was on my old environment.

I’ve been working with the new AWX environment and the new secret key for months.  
I configured the new AWX with the new secret-key I think that now I can no longer replace it with the one recovered from the old environment.

I hope it will be possible to delete all the data related to the applications (I don’t know in which tables) and re-enter everything with the new secret-key.  
It’s possible?

Regards,  
Elia

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 21, 2022, 2:15pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/4 "2022-09-21T14:15:16Z")

</div>

Well it is confusing for me as well.  
But when I import data from my current production environment into a newly setup one.

I do the following.

1. Drop de awx database in postgres.
2. Import the data into postgres
3. Set awx-secret-key.

This worked until 0.21 of the awx operator.

After that I have had no luck so far.

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 21, 2022, 3:04pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/5 "2022-09-21T15:04:59Z")

</div>

I’ve checked in my old environment (AWX 3.0.1.0) and “awx-secret-key” secret it’s differently formatted.

I can’t find “secret\_key” as in my new enviroment… It’s like this:

**_apiVersion: v1_**  
**_data:_**  
**_admin\_password: xxx_**  
**_confd\_contents: xxx_**  
**_pg\_password: xxx_**  
**_rabbitmq\_erlang\_cookie: xxx_**  
**_rabbitmq\_password: xxx_**  
**_kind: Secret_**

**_…_**

Which is the “secret\_key” data?

Elia

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 23, 2022, 5:21am UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/6 "2022-09-23T05:21:25Z")

</div>

HI Elia,

What do you get when you do : kubectl get secret -n   
Is there no awx-secret-key?

Regards Hans

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 23, 2022, 6:56am UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/7 "2022-09-23T06:56:20Z")

</div>

Hi Hans,  
no there isn’t. In this older AWX version there is only a secret “secret\_key” and it’s not the same secret.

![AWX.PNG](https://us1.discourse-cdn.com/ansible/original/2X/8/88750449107512f5e5c1899c822dbdc14c4141cd.png)

Regards,  
Elia

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 26, 2022, 7:39am UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/8 "2022-09-26T07:39:51Z")

</div>

Anyone from the staff who can suggest me how to clean up the db to fix “Application” error?

Thank you very much,  
Elia

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 26, 2022, 9:39am UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/9 "2022-09-26T09:39:31Z")

</div>

Hello Elia

Although I am not staff, perhaps you need to elaborate on what exactly you are doing.  
You have deployed 0.28 but it is not a new installation.  
What does that mean?

Regards Hans-Peter

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 26, 2022, 9:40am UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/10 "2022-09-26T09:40:24Z")

</div>

Is it an external database?

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 26, 2022, 10:05am UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/11 "2022-09-26T10:05:45Z")

</div>

Hi Hans,  
I mean that I restored an external database from a previous AWX version.  
Maybe some secret in the database should have a different signature but only for “Application” I have the issue.

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 26, 2022, 10:11am UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/12 "2022-09-26T10:11:19Z")

</div>

But when you installed 0.28, did you check the awx-operator-controller-manager logging?  
I discovered that some tables have additional columns in new versions.

Regards Hans-Peter

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 26, 2022, 12:31pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/13 "2022-09-26T12:31:44Z")

</div>

Hi,

But have you watched the logging of awx-controller-manager after you did the : **make deploy** command?

What kind of kubernetes do you use?

Regards Hans

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 26, 2022, 12:49pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/14 "2022-09-26T12:49:51Z")

</div>

Yes, I saw the awx-controller-manager log but I didn’t notice anything strange.  
K8s version: 1.22.6

regards Elia

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 26, 2022, 1:12pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/15 "2022-09-26T13:12:42Z")

</div>

I think that you need to:

1. install the old version of awx-operator and have that used the database
2. upgrade it to 0.28

IMHO you need to have awx-secret-key and set it just as in the old environment.

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 26, 2022, 1:23pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/16 "2022-09-26T13:23:49Z")

</div>

As I show you in previous messages in my old enviroment there is no secret key. Or it is in a different secret… there is no “secret\_key” field.

Elia

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 26, 2022, 1:43pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/17 "2022-09-26T13:43:40Z")

</div>

What is the old awx-operator version?

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 26, 2022, 1:50pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/18 "2022-09-26T13:50:22Z")

</div>

I’ve checked in my old environment (AWX 3.0.1.0) and “awx-secret-key” secret it’s differently formatted.

I can’t find “secret\_key” as in my new enviroment… It’s like this:

**_apiVersion: v1_**  
**_data:_**  
**_admin\_password: xxx_**  
**_confd\_contents: xxx_**  
**_pg\_password: xxx_**  
**_rabbitmq\_erlang\_cookie: xxx_**  
**_rabbitmq\_password: xxx_**  
**_kind: Secret_**

**_…_**

Which is the “secret\_key” data?

Elia

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [September 27, 2022, 1:38pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/19 "2022-09-27T13:38:42Z")

</div>

I’ve found a solution clearing “Applications” tables on awx database.

Main table is “main\_oauth2application” and first related tables “main\_oauth2accesstoken”, “oauth2\_provider\_refreshtoken” only for the records affected.

Now “Applications” works fine, Internal server error disappeared.

Regards,  
Elia

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [September 27, 2022, 2:10pm UTC](https://forum.ansible.com/t/awx-applications-internal-server-error/37133/20 "2022-09-27T14:10:54Z")

</div>

Hi  
Super.  
Did you find it somewhere on the web?  
If so can you put it here for the reference?

Regards Hans

[Next page](https://forum.ansible.com/t/awx-applications-internal-server-error/37133.md?page=2)
