Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: connection to server at "postgres" port 5432 failed #5160

Open
tlenclos opened this issue Feb 16, 2025 · 2 comments
Open

[Bug]: connection to server at "postgres" port 5432 failed #5160

tlenclos opened this issue Feb 16, 2025 · 2 comments
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@tlenclos
Copy link

Error Message and Logs

After deploying a docker compose app, the coolify instance got a lot of issues with PostgreSQL

SQLSTATE[08006] [7] connection to server at "postgres" (172.18.0.24), port 5432 failed: FATAL: password authentication failed for user "coolify" (Connection: pgsql, SQL: select * from "sessions" where "id" = HgV3zhLurWyiu8k8UJgM2dEmy6JXWRlNg0E1k7uG limit 1)

Image

Steps to Reproduce

I deployed a docker compose app with Nextjs + Postgresql and then got the issue.

All deployed apps are okay but I'm stuck outside of the Coolify instance sadly.
Sometimes on refresh I can do some actions but got a 500 error really fast, either in a modal or full page.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.390

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Debian GNU/Linux 10 (buster)

Additional Information

No response

@tlenclos tlenclos added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Feb 16, 2025
@tlenclos tlenclos changed the title [Bug]: [Bug]: connection to server at "postgres" port 5432 failed Feb 16, 2025
@djsisson
Copy link
Contributor

This will happen if your compose has a service with the name postgres and you add it to the coolify network, since there is already an existing service with that name docker dns will alternate between the two

To solve either do not put your project in the coolify network or rename the postgre service in your compose.

You will need to stop the extra postgres container in the coolify network

Run docker ps to get the id you need to stop

@tlenclos
Copy link
Author

Thank you so much ! I managed to stop the new project in the UI with a bit of refreshing.

Do you know if there is an issue about validating a docker compose to avoid this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

2 participants