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
Comments
4 comments
-
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
-
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.
-
thank you so much.
-
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.
Add comment
Please sign in to leave a comment.