Alexander_mozilla
08/26/2025, 3:54 PMkapa.ai
08/26/2025, 3:54 PMnc: bad address 'db' or similar (e.g., nc: bad address 'active_stack_postgres') and repeated "Waiting for PostgreSQL to startup" in the airbyte-temporal logs typically indicates a networking or DNS resolution issue between your Airbyte containers and the PostgreSQL service. This is a common problem when running Airbyte with Docker Compose or Docker Swarm, especially if the service name is not resolvable within the Docker network. Based on the knowledge sources, here are the most likely causes and solutions: 1. Service Name Resolution The DATABASE_HOST environment variable should match the service name as defined in your Docker Compose or Swarm stack. In your case, you are using active_stack_postgres. Make sure that: - The active_stack_postgres service is correctly defined in the same docker-compose.yml or stack file. - Both airbyte-temporal and active_stack_postgres are on the same Docker network (pipeline_net). 2. Network Configuration in Docker Swarm In Docker Swarm, all services attached to the same overlay network should be able to resolve each other by service name. Double-check that both services are attached to pipeline_net. 3. PostgreSQL Service Health If the PostgreSQL container is not starting up correctly (e.g., port 5432 is already in use, or the database fails to initialize), the temporal service will keep waiting. Check the logs of your active_stack_postgres service for errors like "could not bind address" or "FATAL: could not create any TCP/IP sockets" as seen in similar issues: - If you see errors about port 5432 being in use, ensure no other PostgreSQL instance is running on the host or in another container using the same port [[Forum: Unable to deploy due to airbyte-db not building properly](https://discuss.airbyte.io/t/4336)]. 4. Wait-for-it Script Your command uses wait-for-it.sh to wait for the database to be available. If the hostname is not resolvable, this script will fail with "bad address". This again points to a networking or service name issue. 5. Example of Similar Issues - Users have reported the same "nc: bad address" and "Waiting for PostgreSQL to startup" when the database service name was incorrect or the network was misconfigured [[Forum: Error installing/deploying airbyte](https://discuss.airbyte.io/t/1158)]. - If using Docker Compose, the default database service is often named db, so if you copy configs from documentation, ensure you update the service name everywhere. What to do: - Double-check that active_stack_postgres is the correct service name and is up and running. - Ensure both services are on the same Docker network. - Inspect the logs of active_stack_postgres for any startup errors. - Try to exec into the airbyte-temporal container and run ping active_stack_postgres or nc -z active_stack_postgres 5432 to test connectivity. If you continue to see the issue after these checks, please provide the definition of your active_stack_postgres service and any relevant logs from that container. References: - [Forum: Error installing/deploying airbyte](https://discuss.airbyte.io/t/1158) - [Forum: Unable to deploy due to airbyte-db not building properly](https://discuss.airbyte.io/t/4336) - [Forum: DNS issue? - Unable to resolve host airbyte-temporal](https://discuss.airbyte.io/t/3899)