# AWX DB password issue in Kubernetes install

**URL:** <https://forum.ansible.com/t/awx-db-password-issue-in-kubernetes-install/34329>\
**Category:** AWX Project\
**Tags:** awx, kubernetes\
**Created:** [December 14, 2020, 3:52am UTC](https://forum.ansible.com/t/awx-db-password-issue-in-kubernetes-install/34329 "2020-12-14T03:52:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cnu\_k](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@Cnu\_k](https://forum.ansible.com/u/Cnu_k)\
**Post date:** [December 14, 2020, 3:52am UTC](https://forum.ansible.com/t/awx-db-password-issue-in-kubernetes-install/34329/1 "2020-12-14T03:52:50Z")

</div>

Hi,

I have installed AWX(built and pushed to a private repo) and PostgreSQL containers(installed DB containers from [docker.io](http://docker.io)). Installation was successful after some effort and I see following 3 pods in running state.

NAME READY STATUS RESTARTS AGE  
pod/ansible-tower-management 1/1 Running 0 76m  
pod/awx-56dff655f5-c5rrr 3/3 Running 0 76m  
pod/awx-postgresql-postgresql-0 1/1 Running 0 75m

I am unable to access AWX web console and see below errors when I checked awx-web container log.

kubectl logs -n awx pod/awx-56dff655f5-c5rrr -c awx-web -n awx --tail 200

File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 217, in ensure\_connection  
self.connect()  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/utils.py”, line 89, in **exit**  
raise dj\_exc\_value.with\_traceback(traceback) from exc\_value  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 217, in ensure\_connection  
self.connect()  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/base/base.py”, line 195, in connect  
self.connection = self.get\_new\_connection(conn\_params)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/db/backends/postgresql/base.py”, line 178, in get\_new\_connection  
connection = Database.connect(\*\*conn\_params)  
File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/psycopg2/ **init**.py”, line 126, in connect  
**conn = \_connect(dsn, connection\_factory=connection\_factory, \*\*kwasync)**  
**django.db.utils.OperationalError: FATAL: password authentication failed for user “awx”**

kubectl logs -n awx pod/awx-postgresql-postgresql-0 -n awx --tail 200

Connection matched pg\_hba.conf line 95: “host all all all md5”  
2020-12-14 03:35:43.908 UTC [2572] FATAL: **password authentication failed for user “awx”**

Changes made to file:

# Kubernetes Install

kubernetes\_context=docker-desktop  
kubernetes\_namespace=awx  
kubernetes\_web\_svc\_type=NodePort

# Optional Kubernetes Variables

pg\_image\_registry=[docker.io](http://docker.io)  
pg\_serviceaccount=awx  
pg\_volume\_capacity=5  
pg\_persistence\_storageClass=pgs

# Created PV and PVC for this

pg\_persistence\_existingclaim=awx-pvc

# Common Docker parameters

awx\_task\_hostname=MyPC  
awx\_web\_hostname= MyPC

# Used this path as ‘hostPath’ path in PV YAML as well

postgres\_data\_dir=“/home/users/awx-db-data”

docker\_registry=[docker.io](http://docker.io)  
docker\_registry\_repository=myrepo  
docker\_registry\_username=myuser

pg\_password=awxtest422  
pg\_database=awx  
pg\_port=5432

use\_container\_for\_build=true

admin\_user=awx  
admin\_password=awx@dminTest

secret\_key=awxsecretTst

I do see above mentioned password as environment variable when I exec into PostgreSQL pod, so not sure what’s missing here. I have deleted and re-build AWX images couple of times so far, and consistently getting the same error.  
I tried changing admin\_user value from ‘admin’ to ‘awx’ since that was mentioned as an issue in older versions but no luck yet.  
Looks like I am missing something here, but unable to identify that.

Thanks

---

<div class="post-metadata">

**Author:** ![Cnu\_k](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@Cnu\_k](https://forum.ansible.com/u/Cnu_k)\
**Post date:** [December 14, 2020, 7:43pm UTC](https://forum.ansible.com/t/awx-db-password-issue-in-kubernetes-install/34329/2 "2020-12-14T19:43:17Z")

</div>

Not sure what the issue was, running same install again after Windows restart fixed the problem. Maybe it’s Windows issue since I am testing in WSL Ubuntu and Docker Desktop single node Kubernetes cluster.
