No. I opened awx database and searched the main table for “Applications”… then trying to delete records from there I’ve discovered related tables.
Regards,
Elia
No. I opened awx database and searched the main table for “Applications”… then trying to delete records from there I’ve discovered related tables.
Regards,
Elia
Elia, nice digging, could you open an issue on AWX detailing the internal 500 error and how you resolved it? at the very least there should be better error messages in this scenario
Thanks!
AWX Team
Ok. Done.
Regards,
Elia
nice one. Thanks Elia. This helped.
On thing before I go on. Could you please post your github issue number here, for others to find and refer to? I couldn’t really find any issues raised for this on the awx-operator or awx github issues page.
I had the same issue as you. Only difference is that this is a new deployment. I did not migrate the database prior to it. Still using an external database.
My issue was generated by something in the activity stream table for activities
/api/v2/activity_stream/140/ and /api/v2/activity_stream/139/
There was a token created at some point for the bash application. I suspect that this is a token I created for myself, to run API calls that…went bad, somehow.
To resolve this, I deleted all relations for the toke from the following tables:
main_activitystream_o_auth2_application
main_oauth2accesstoken
main_oauth2application
oauth2_provider_refreshtoken
main_activitystream_o_auth2_access_token
This is also the API information as well as the token entry from the DB. Nothing looks bad…Also note that I had just upgraded AWX today and I was accessing applications after the upgrade. Before today, I can’t remember when I accessed that page for the last time, but it was probably on the 21nd of October.
HTTP 200 OK Allow: GET, HEAD, OPTIONS Content-Type: application/json Vary: Accept X-API-Node: loki-7cbd4888d6-hph4k X-API-Product-Name: AWX X-API-Product-Version: 21.8.0 X-API-Time: 0.034s { "id": 139, "type": "activity_stream", "url": "/api/v2/activity_stream/139/", "related": { "actor": "/api/v2/users/1/" }, "summary_fields": { "actor": { "id": 1, "username": "admin", "first_name": "", "last_name": "" } }, "timestamp": "2022-10-21T11:30:45.043907Z", "operation": "create", "changes": { "name": "bash", "description": "", "client_type": "confidential", "redirect_uris": "https://ansible.aimcorp.co.uk/", "authorization_grant_type": "authorization-code", "skip_authorization": false, "organization": "Default-1", "id": 1 }, "object1": "o_auth2_application", "object2": "", "object_association": "", "action_node": "loki-dd4c549f4-pngzh", "object_type": "" }
HTTP 200 OK Allow: GET, HEAD, OPTIONS Content-Type: application/json Vary: Accept X-API-Node: loki-7cbd4888d6-hph4k X-API-Product-Name: AWX X-API-Product-Version: 21.8.0 X-API-Time: 0.036s { "id": 140, "type": "activity_stream", "url": "/api/v2/activity_stream/140/", "related": { "actor": "/api/v2/users/1/" }, "summary_fields": { "actor": { "id": 1, "username": "admin", "first_name": "", "last_name": "" } }, "timestamp": "2022-10-21T11:31:30.549299Z", "operation": "create", "changes": { "description": "", "application": "bash", "scope": "write", "id": 1, "token": "************" }, "object1": "o_auth2_access_token", "object2": "", "object_association": "", "action_node": "loki-dd4c549f4-pngzh", "object_type": "" }
id | token | access_token_id | application_id | user_id | created | updated | revoked
----+--------------------------------+-----------------+----------------+---------+-------------------------------+-------------------------------+---------
1 | CyiHOuzUhy4y25L4PnKRmFzuTnEbFX | 1 | 1 | 1 | 2022-10-21 13:31:30.568923+02 | 2022-10-21 13:31:30.568939+02 |
Github: https://github.com/ansible/awx/issues/12978
Regards,
Elia
Ah. It was Closed. That’s why i did not find it.
Mille grazie.