postgres-db - error - FATAL: role "awx" does not exist error

211 views
Skip to first unread message

Mahesh Reddy

unread,
May 26, 2023, 9:12:58 AM5/26/23
to AWX Project
I'm trying to deploy awx on azure aks, also I'm using NFS file share from the azure file share storage.

When I run the kebectl apply -k awx I was getting the following error. Any help would be highly appreciated.

k logs -f awx-postgres-13-0

PostgreSQL Database directory appears to contain a database; Skipping initialization

2023-05-26 13:04:42.949 UTC [1] LOG:  starting PostgreSQL 13.11 (Debian 13.11-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-05-26 13:04:42.949 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-05-26 13:04:42.949 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2023-05-26 13:04:43.195 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-05-26 13:04:43.293 UTC [25] LOG:  database system was shut down at 2023-05-26 12:59:57 UTC
2023-05-26 13:04:43.409 UTC [1] LOG:  database system is ready to accept connections
2023-05-26 13:05:38.206 UTC [32] FATAL:  role "awx" does not exist
2023-05-26 13:05:39.699 UTC [33] FATAL:  role "awx" does not exist
2023-05-26 13:05:41.672 UTC [34] FATAL:  role "awx" does not exist
2023-05-26 13:05:43.976 UTC [35] FATAL:  role "awx" does not exist
2023-05-26 13:05:44.652 UTC [36] FATAL:  role "awx" does not exist

# kubectl get pv,pvc
NAME                           CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                     STORAGECLASS   REASON   AGE
persistentvolume/postgres-pv   10Gi       RWO            Retain           Bound    awx-tower/postgres-13-awx-postgres-13-0   azurefile               8m2s

NAME                                                  STATUS   VOLUME        CAPACITY   ACCESS MODES   STORAGECLASS   AGE
persistentvolumeclaim/postgres-13-awx-postgres-13-0   Bound    postgres-pv   10Gi       RWO            azurefile      8m2s

# kubectl get po
NAME                                               READY   STATUS    RESTARTS   AGE
awx-operator-controller-manager-5fc6df55df-v5c4g   2/2     Running   0          8m31s
awx-postgres-13-0                                  1/1     Running   0          7m25s
awx-task-78dfd444dc-8dg5l                          4/4     Running   0          6m57s
awx-web-cc4486cb5-knj7h                            3/3     Running   0          6m15s

AWX Project

unread,
May 26, 2023, 1:25:46 PM5/26/23
to AWX Project
Are you using an external database? Is the NFS file store in play for the database server?
Is it possible that you are reusing a file system with an older postgres database already on it?

The message 'FATAL:  role "awx" does not exist' seems to indicate that the awx user is not in the database and that would be causing issues when AWX attempts to connect.
You might also want to check the operator logs just to see if there are any obvious issues as well but we kind of expect those to be clean.
It might also be worth running with the no log setting set to false and see if there are any messages about the awx user in relation to the database.

-The AWX Team

Mahesh Reddy

unread,
May 27, 2023, 12:29:46 AM5/27/23
to awx-p...@googlegroups.com
Looks like the NFS directory already has postgres db info which is causing the issue. I just deleted everything from nfs folder and re-applied customization. This time it worked. 

Thank you for your quick response on this matter.


--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/cd0e417f-a12e-4b05-a5da-9c1cc6f1721bn%40googlegroups.com.


--
Sincerely,

Mahesh
9100030600
Reply all
Reply to author
Forward
0 new messages