# could not translate host name "awx-postgresql"

**URL:** <https://forum.ansible.com/t/could-not-translate-host-name-awx-postgresql/32536>\
**Category:** AWX Project\
**Tags:** ubuntu, awx, kubernetes\
**Created:** [March 26, 2020, 7:18am UTC](https://forum.ansible.com/t/could-not-translate-host-name-awx-postgresql/32536 "2020-03-26T07:18:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SANCHIT\_KHANDELWAL](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@SANCHIT\_KHANDELWAL](https://forum.ansible.com/u/SANCHIT_KHANDELWAL)\
**Post date:** [March 26, 2020, 7:18am UTC](https://forum.ansible.com/t/could-not-translate-host-name-awx-postgresql/32536/1 "2020-03-26T07:18:12Z")

</div>

##### ISSUE TYPE- Bug Report

##### COMPONENT NAME- Installer

##### SUMMARY

running the installer against a kubernetes cluster does not finish,  
stuck at database migration

##### ENVIRONMENT- AWX install method: kubernetes

- Ansible version: 2.9.2
- Operating System: ubuntu 16.04.6
- Web Browser: Chrome

##### STEPS TO REPRODUCE

fill in the kuberentes variables in the inventory

```auto
# Kubernetes Install
kubernetes_context=kubeawx
kubernetes_namespace=awx
tiller_namespace=kube-system
pg_persistence_storageClass=standard

```

and run  
`ansible-playbook -i inventory install.yml`

##### EXPECTED RESULTS

awx gets installed

##### ACTUAL RESULTS

the task migrate databases ended in error

##### ADDITIONAL INFORMATION

`TASK [kubernetes : Migrate database] ********************************************************************************************************************************************************************************************************* `Traceback (most recent call last):

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/backends/base/base.py”, line 217, in ensure\_connection

self.connect()

File “/var/lib/awx/venv/awx/lib64/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/lib64/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/lib64/python3.6/site-packages/psycopg2/ **init**.py”, line 126, in connect

conn = \_connect(dsn, connection\_factory=connection\_factory, \*\*kwasync)

psycopg2.OperationalError: could not translate host name “awx-postgresql” to address: Name or service not known

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File “/usr/bin/awx-manage”, line 11, in

load\_entry\_point(‘awx==9.1.0.0’, ‘console\_scripts’, ‘awx-manage’)()

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/ **init**.py”, line 165, in manage

execute\_from\_command\_line(sys.argv)

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/ **init**.py”, line 381, in execute\_from\_command\_line

utility.execute()

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/ **init**.py”, line 375, in execute

self.fetch\_command(subcommand).run\_from\_argv(self.argv)

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/base.py”, line 323, in run\_from\_argv

self.execute(\*args, \*\*cmd\_options)

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/base.py”, line 364, in execute

output = self.handle(\*args, \*\*options)

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/base.py”, line 83, in wrapped

res = handle\_func(\*args, \*\*kwargs)

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/commands/migrate.py”, line 87, in handle

executor = MigrationExecutor(connection, self.migration\_progress\_callback)

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/migrations/executor.py”, line 18, in **init**

self.loader = MigrationLoader(self.connection)

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/migrations/loader.py”, line 49, in **init**

self.build\_graph()

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/migrations/loader.py”, line 212, in build\_graph

self.applied\_migrations = recorder.applied\_migrations()

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/migrations/recorder.py”, line 73, in applied\_migrations

if self.has\_table():

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/migrations/recorder.py”, line 56, in has\_table

return self.Migration.\_meta.db\_table in self.connection.introspection.table\_names(self.connection.cursor())

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/backends/base/base.py”, line 256, in cursor

return self.\_cursor()

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/backends/base/base.py”, line 233, in \_cursor

self.ensure\_connection()

File “/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/backends/base/base.py”, line 217, in ensure\_connection

self.connect()

File “/var/lib/awx/venv/awx/lib64/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/lib64/python3.6/site-packages/django/db/backends/base/base.py”, line 217, in ensure\_connection

self.connect()

File “/var/lib/awx/venv/awx/lib64/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/lib64/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/lib64/python3.6/site-packages/psycopg2/ **init**.py”, line 126, in connect

conn = \_connect(dsn, connection\_factory=connection\_factory, \*\*kwasync)

django.db.utils.Operational **Error: could not translate host name “awx-postgresql” to address: Name or service not known**

---

<div class="post-metadata">

**Author:** ![Shane\_McDonald](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Shane\_McDonald](https://forum.ansible.com/u/Shane_McDonald)\
**Post date:** [March 26, 2020, 1:51pm UTC](https://forum.ansible.com/t/could-not-translate-host-name-awx-postgresql/32536/2 "2020-03-26T13:51:45Z")

</div>

Can you try upgrading to the latest release? There’s been a good number of changes to the Kubernetes installer in recent months.

---

<div class="post-metadata">

**Author:** ![SANCHIT\_KHANDELWAL](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@SANCHIT\_KHANDELWAL](https://forum.ansible.com/u/SANCHIT_KHANDELWAL)\
**Post date:** [March 26, 2020, 2:28pm UTC](https://forum.ansible.com/t/could-not-translate-host-name-awx-postgresql/32536/3 "2020-03-26T14:28:40Z")

</div>

We don’t want to go into those changes…Is there any way out to resolve the below issue on 9.1.0 version itself?
