Periodic service outages due to Podman name resolution failures
![Its-always-dns](/uploads/e84feb119e7fb334f3bf43dd68f92a41/Its-always-dns.jpeg) All services along with a Postgres-database are deployed as containers on the same host and connect to each other through Docker/Podman's internal DNS. The name resolution has now failed multiple times and in turn caused the service to lose database connectivity, therefor causing an outage. This has happened across multiple hosts, but usually only affects one or two services. More specifically, I have only observed these failures with Mattermost and Nextcloud. ### Logs **Mattermost**: ``` {"timestamp":"2025-11-12 13:17:05.003 +01:00","level":"error","msg":"Error occurred getting all pending statuses.","caller":"jobs/jobs_watcher.go:73","error":"failed to find Jobs with status=pending: dial tcp: lookup postgres on [fd8f:9ee7:436f:5c72::1]:53: read udp [fd8f:9ee7:436f:5c72::4]:47335->[fd8f:9ee7:436f:5c72::1]:53: read: permission denied"} {"timestamp":"2025-11-12 13:17:25.006 +01:00","level":"error","msg":"Error occurred getting all pending statuses.","caller":"jobs/jobs_watcher.go:73","error":"failed to find Jobs with status=pending: dial tcp: lookup postgres on [fd8f:9ee7:436f:5c72::1]:53: read udp [fd8f:9ee7:436f:5c72::4]:39903->[fd8f:9ee7:436f:5c72::1]:53: read: permission denied"} {"timestamp":"2025-11-12 13:17:35.091 +01:00","level":"error","msg":"Failed to schedule job","caller":"jobs/schedulers.go:92","scheduler":"cleanup_desktop_tokens","error":"CheckForPendingJobsByType: Konnte die Anzahl der Jobs nicht über Status und Typ abrufen., failed to count Jobs with status=pending and type=cleanup_desktop_tokens: dial tcp: lookup postgres on [fd8f:9ee7:436f:5c72::1]:53: read udp [fd8f:9ee7:436f:5c72::4]:59229->[fd8f:9ee7:436f:5c72::1]:53: read: permission denied"} {"timestamp":"2025-11-12 13:17:40.093 +01:00","level":"error","msg":"Error occurred getting all pending statuses.","caller":"jobs/jobs_watcher.go:73","error":"failed to find Jobs with status=pending: dial tcp: lookup postgres on [fd8f:9ee7:436f:5c72::1]:53: read udp [fd8f:9ee7:436f:5c72::4]:46919->[fd8f:9ee7:436f:5c72::1]:53: read: permission denied"} {"timestamp":"2025-11-12 13:17:40.093 +01:00","level":"error","msg":"Failed to schedule job","caller":"jobs/schedulers.go:92","scheduler":"expiry_notify","error":"CheckForPendingJobsByType: Konnte die Anzahl der Jobs nicht über Status und Typ abrufen., failed to count Jobs with status=pending and type=expiry_notify: dial tcp: lookup postgres on [fd8f:9ee7:436f:5c72::1]:53: read udp [fd8f:9ee7:436f:5c72::4]:46919->[fd8f:9ee7:436f:5c72::1]:53: read: permission denied"} ``` **Nextcloud**: ``` PHP Fatal error: Uncaught Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] could not translate host name "postgres" to address: Temporary failure in name resolution in /var/www/html/lib/private/DB/Connection.php:238 ```
issue