Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

Airflow can't reach postgre #1

Open
ColinMaudry opened this issue Sep 13, 2021 · 0 comments
Open

Airflow can't reach postgre #1

ColinMaudry opened this issue Sep 13, 2021 · 0 comments
Assignees

Comments

@ColinMaudry
Copy link
Member

ColinMaudry commented Sep 13, 2021

I have set it up with the following .env:

# Other domain configurations
ETL_HOST=0.0.0.0 

# Airflow configuration (used in td-etl)
AIRFLOW_POSTGRES_USER=airflow
AIRFLOW_POSTGRES_PASSWORD=superpass
AIRFLOW_FERNET_KEY=97976DFDJBKJ
ETL_DB=etl

POSTGRES_HOST=0.0.0.0
POSTGRES_PORT=5432
POSTGRES_USER=root
POSTGRES_PASSWORD=superpass

But when I run sudo docker-compose up, Airflow connection to postgre times up, most likely because it doesn't look at the right address/port:

Starting trackdechets-etl_postgres_1 ... done
Recreating trackdechets-etl_td-etl_1 ... done
Attaching to trackdechets-etl_postgres_1, trackdechets-etl_td-etl_1
postgres_1  | 2021-09-13 15:12:21.044 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres_1  | 2021-09-13 15:12:21.044 UTC [1] LOG:  listening on IPv6 address "::", port 5432
td-etl_1    | Mon Sep 13 15:12:21 UTC 2021 - waiting for Postgres... 1/20
postgres_1  | 2021-09-13 15:12:21.046 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1  | 2021-09-13 15:12:21.074 UTC [22] LOG:  database system was shut down at 2021-09-13 15:11:08 UTC
postgres_1  | 2021-09-13 15:12:21.081 UTC [1] LOG:  database system is ready to accept connections
td-etl_1    | Mon Sep 13 15:12:26 UTC 2021 - waiting for Postgres... 2/20
td-etl_1    | Mon Sep 13 15:12:31 UTC 2021 - waiting for Postgres... 3/20
[...]
td-etl_1    | Mon Sep 13 15:13:51 UTC 2021 - waiting for Postgres... 19/20
td-etl_1    | Mon Sep 13 15:13:56 UTC 2021 - 0.0.0.0:5432 still not reachable, giving up
trackdechets-etl_td-etl_1 exited with code 1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants