How can we help you today? How can we help you today?

Error Unable to obtain connection from database for user postgres SQL State : 08001

I'm testing PostgreSQL with Flyway ( from docker-compose.yml ) and faced issue with connections on github actions, workflow fails

ERROR: Unable to obtain connection from database (jdbc:postgresql://db/a_site_to_order_stuff?sslmode=require) for user 'postgres': The connection attempt failed.

db - is the name of postgres service.
I also tried to connect my containers IPĀ 

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name

Did not help me, same issue
Vadym11
0

Comments

4 comments

  • Vadym11

    I added to my workflow file:

    FLYWAY_URL=jdbc:postgresql://db:5432/test -e FLYWAY_USER=postgres -e FLYWAY_PASSWORD=postgres flyway migrate

    Successfully run my workflow


    Vadym11
    0
  • jack1111
    The error message "Unable to obtain connection from database for user postgres SQL State : 08001" typically indicates a problem with establishing a connection to the PostgreSQL database. It could be due to incorrect credentials, network issues, or the database server being unavailable. Troubleshooting should involve verifying connection parameters, network settings, and ensuring the PostgreSQL service is running and accessible.

    jack1111
    0
  • jack1111
    thank you so much.
    jack1111
    0
  • jack1111
    The error message "Unable to obtain connection from database for user postgres SQL State: 08001" indicates a connection issue with the database. SQL State 08001 typically points to a network-related problem or incorrect connection parameters (e.g., hostname, port, username, or password). Verify the database server's availability and ensure that the connection details are correct.

    jack1111
    0

Add comment

Please sign in to leave a comment.