Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Installing AWX give error “Is the server running on host ”postgres“ and accepting”

I follow instruction Installing AWX
In the instruction, I choose 'Docker or Docker-Compose' and mostly choose the default. (without Docker-Compose)

When I run 'ansible-playbook -i inventory install.yml' the installation finish okay.
Then, as recommended, I check the installation with 'docker logs -f awx_task'.
I did not see the success or the lines that indicating that migrations have completed.
instead it's show:
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/backends/base/base.py", line 189, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/backends/postgresql/base.py", line 176, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/psycopg2/__init__.py", line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
OperationalError: could not connect to server: No route to host
    Is the server running on host "postgres" (172.17.0.2) and accepting
    TCP/IP connections on port 5432?

2018-12-11 07:22:51,674 - INFO - runworker - Using single-threaded worker.
2018-12-11 07:22:51,674 - INFO - runworker - Running worker against channel layer default (asgi_amqp.core.AMQPChannelLayer)
2018-12-11 07:22:51,674 - INFO - worker - Listening on channels websocket.connect, websocket.disconnect, websocket.receive
RESULT 2
OKREADY
Anyway when I try it and go to http://localhost I get: A server error has occurred.
I know little about docker container. The docker container are running.
Running 'docker logs -f postgres' give:
STATEMENT:  SELECT "django_migrations"."id", "django_migrations"."app", "django_migrations"."name", "django_migrations"."applied" FROM "django_migrations" WHERE ("django_migrations"."app" = 'main' AND NOT ("django_migrations"."name"::text LIKE '%squashed%')) ORDER BY "django_migrations"."id" DESC LIMIT 1
ERROR:  relation "django_migrations" does not exist at character 124
STATEMENT:  SELECT "django_migrations"."id", "django_migrations"."app", "django_migrations"."name", "django_migrations"."applied" FROM "django_migrations" WHERE ("django_migrations"."app" = 'main' AND NOT ("django_migrations"."name"::text LIKE '%squashed%')) ORDER BY "django_migrations"."id" DESC LIMIT 1
    LOG:  could not receive data from client: Connection timed out
    LOG:  could not receive data from client: Connection timed out
What can cause this problem?
Thanks.

Comments