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

FATAL: server login failed: wrong password type #93

Open
kerren opened this issue Mar 11, 2024 · 2 comments
Open

FATAL: server login failed: wrong password type #93

kerren opened this issue Mar 11, 2024 · 2 comments

Comments

@kerren
Copy link

kerren commented Mar 11, 2024

Hi everyone,

When I tried to put pgbouncer between my containers and started it up, I saw the following error when querying the database:

SQLSTATE[08006] [7] connection to server at "pgbouncer" (x.x.x.x), port 5432 failed: FATAL:  server login failed: wrong password type (SQL: select * from "user" where "user"."deleted_at" is null limit 1).

SOLUTION:
When looking through the issues, there were some comments about the AUTH_TYPE so I looked at the entrypoint.sh file and I see that if you set it to plain or scram-sha-256 it'll use those, otherwise it'll use md5.

So to fix the problem (specifically for me), I set the AUTH_TYPE environment variable to scram-sha-256 and that worked.

I see that there is a PR to add a comment for postgres >= 14 where it adds this in the docker-compose.yaml file https://github.com/edoburu/docker-pgbouncer/pull/90/files. However, this would have to be updated for standard docker and kubernetes as well.

@jflambert
Copy link
Collaborator

I'll merge the other PR thanks for the bump.

What did you mean by docker and kubernetes?

@kerren
Copy link
Author

kerren commented Mar 12, 2024

Thanks @jflambert !

I just mean that this would be applicable on all setups, not just the docker-compose.yaml file. For docker people would have to use the -e flag and for kubernetes, people would have to set it in the env: key in the deployment yaml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants