spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.91k stars 1.04k forks source link

psql: error: could not translate host name "matrix-postgres" to address: Try again #1623

Open TheRedTopHat opened 2 years ago

TheRedTopHat commented 2 years ago

This error occurs during the matrix-postgres : Execute Postgres additional database initialization SQL file for synapse play. The error output is below. It first appeared when I added the necessary options to vars.yaml to install dimension, as outlined here. I have since commented those out, thinking they may have been causing the problem, but the error persists. Happy to provide any additional output needed, any suggestions are appreciated. Thanks!

Error:

fatal: [matrix.<DOMAIN>]: FAILED! => changed=true
  cmd:
  - /usr/bin/env
  - docker
  - run
  - --rm
  - --user=999:1000
  - --cap-drop=ALL
  - --env-file=/matrix/postgres/env-postgres-psql
  - --network
  - matrix
  - --mount
  - type=bind,src=/tmp/matrix-postgres-init-additional-db-user-and-role.sql,dst=/matrix-postgres-init-additional-db-user-and-role.sql,ro
  - --entrypoint=/bin/sh
  - docker.io/postgres:14.1-alpine
  - -c
  - psql -h matrix-postgres --file=/matrix-postgres-init-additional-db-user-and-role.sql
  delta: '0:00:06.992784'
  end: '2022-02-12 04:24:52.071351'
  msg: non-zero return code
  rc: 2
  start: '2022-02-12 04:24:45.078567'
  stderr: 'psql: error: could not translate host name "matrix-postgres" to address: Try again'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>
beautifulplace commented 2 years ago

Hi. Have you had any luck with this? I'm getting the same error on arm64 following the directions here https://matrix.org/docs/guides/free-small-matrix-server

supermar1010 commented 2 years ago

I'm facing the same error. I never had Dimension enabled so, doesn't seem to be related to that? I'm using fedora 36