How to connect airflow with database by unsing Astronomer

209 Views Asked by At

Please tell me how I can connect Apache Airflow (I run it via “astro” on the local computer) and my database (PostgreSQL), which is also installed on my local computer?

Traceback

psycopg2.OperationalError: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
    Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address
    Is the server running on that host and accepting TCP/IP connections?

By the way, how can I enable connection testing in the admin-connection panel? (I tried to write test_connection = Enabled in the airflow.cfg file inside the docker container, but it does not work, even after rebooting the container)

I tried adding "host.docker.localhost" to the connection, but it didn't help.

0

There are 0 best solutions below