# Failing With external DB(TASK \[kubernetes : Migrate database\])

**URL:** <https://forum.ansible.com/t/failing-with-external-db-task-kubernetes-migrate-database/30625>\
**Category:** AWX Project\
**Tags:** awx, kubernetes\
**Created:** [June 21, 2019, 7:53am UTC](https://forum.ansible.com/t/failing-with-external-db-task-kubernetes-migrate-database/30625 "2019-06-21T07:53:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashok\_kumar](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@ashok\_kumar](https://forum.ansible.com/u/ashok_kumar)\
**Post date:** [June 21, 2019, 7:53am UTC](https://forum.ansible.com/t/failing-with-external-db-task-kubernetes-migrate-database/30625/1 "2019-06-21T07:53:14Z")

</div>

Hi Team,

I am trying to deploy AWX on K8 cluster. While deploying with external postgres getting below error.

TASK [kubernetes : Migrate database] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

fatal: [localhost]: FAILED! =\> {“changed”: true, “cmd”: “kubectl -n 2304378531 exec ansible-tower-management – bash -c "awx-manage migrate --noinput"”, “delta”: “0:00:32.867937”, “end”: “2019-06-21 12:54:32.437733”, “msg”: “non-zero return code”, “rc”: 137, “start”: “2019-06-21 12:53:59.569796”, “stderr”: “command terminated with exit code 137”, “stderr\_lines”: [“command terminated with exit code 137”], “stdout”: “Operations to perform:\n Apply all migrations: auth, conf, contenttypes, main, oauth2\_provider, sessions, sites, social\_django, sso, taggit\nRunning migrations:\n Applying main.0004\_squashed\_v310\_release… OK\n Applying conf.0001\_initial… OK\n Applying conf.0002\_v310\_copy\_tower\_settings… OK\n Applying main.0005\_squashed\_v310\_v313\_updates… OK\n Applying main.0006\_v320\_release…”, “stdout\_lines”: [“Operations to perform:”, " Apply all migrations: auth, conf, contenttypes, main, oauth2\_provider, sessions, sites, social\_django, sso, taggit", “Running migrations:”, " Applying main.0004\_squashed\_v310\_release… OK", " Applying conf.0001\_initial… OK", " Applying conf.0002\_v310\_copy\_tower\_settings… OK", " Applying main.0005\_squashed\_v310\_v313\_updates… OK", " Applying main.0006\_v320\_release…"]}

to retry, use: --limit @/Users/ashok.g/Downloads/awx-devel/installer/install.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

localhost : ok=16 changed=7 unreachable=0 failed=1

Please help me on this?

Regards,

Ashok.G

---

<div class="post-metadata">

**Author:** ![Raja\_V](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@Raja\_V](https://forum.ansible.com/u/Raja_V)\
**Post date:** [July 18, 2019, 4:57pm UTC](https://forum.ansible.com/t/failing-with-external-db-task-kubernetes-migrate-database/30625/2 "2019-07-18T16:57:10Z")

</div>

Ashok,

Are you pg server is up and running in the same network.  
Have you enabled and changed pg\_hostname
