Open Valentin-Metz opened 5 months ago
Sounds like https://github.com/docker/compose/issues/11601, maybe related to a Docker Engine issue. Can you give latest release a try, 25.0.4 at least includes some relevant networking fixes, see Moby v25.0.4
Sounds like #11601, maybe related to a Docker Engine issue. Can you give latest release a try, 25.0.4 at least includes some relevant networking fixes, see Moby v25.0.4
I'll try that and see if the issue persists.
Networking within Docker seems a lot more stable since the update. I've had no issues since. If nothing comes up within the next month, I think it's save to assume this to be solved and close the issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
I am running Matrix in a docker compose setup with traefik. The relevant parts of the compose:
Synapse requires network access (through the default network) and is published through the traefik reverse proxy network. It also depends on the postgres database, so it should also connect to the
matrix_compose_default
(based on folder name) network.This is how a
dops -a
looks like if it starts successfully:matrix_compose-synapse-1
is in both networks.I have the synapse service in a daily restart/upgrade cronjob:
cd /root/matrix_compose/ && docker compose pull && docker compose down && sleep 5 && docker compose up --force-recreate --build --remove-orphans -d
This sometimes fails to start correctly, due to docker not correctly connectingsynapse
to thedb
container before starting it. The error given by synapse:psycopg2.OperationalError: could not translate host name "synapse-postgres" to address: Name or service not known
Output of
dops -a
at the time:synapse
is not in thematrix_compose_default
default network this time, and instead restarting continuously as it fails to connect to the database. This is flaky, and if I rerun the cronjob command it fixes itself.Steps To Reproduce
No response
Compose Version
Docker Environment
Anything else?
No response