I'm getting issue with airbyte-temporal while conn...
# ask-ai
a
I'm getting issue with airbyte-temporal while connecting with postgreysql data base .. airbyte-temporal logs : showing nc bad address ' ' waiting for postgressql to startup airbyte-temporal: image: airbyte/temporal:0.63.1 environment: - DATABASE_HOST=active_stack_postgres - DATABASE_PORT=5432 - DATABASE_DB=temporal - DATABASE_USER=airbyte - DATABASE_PASSWORD=airbyte command: ["/usr/local/bin/wait-for-it.sh", "active_stack_postgres:5432", "--", "./update-and-start-temporal.sh"] volumes: - /home/vm01/lab_stack/wait-for-it.sh/usr/local/bin/wait for it.shro deploy: replicas: 1 restart_policy: condition: on-failure depends_on: - active_stack_postgres networks: - pipeline_net This is my airbyte service in docker yaml and I'm using docker swarm for network
k
The error message
nc: 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)