You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My issue is about the documentation content or website
Type of issue
Information is incorrect
Description
When attempting to run a Docker Compose setup with todo-app server and postgres containers, authentication failures happens for PostgreSql container. (Docker docs: using containers for Node.js development)
authentication error:
2024-04-24 16:25:40.510 UTC [27] FATAL: password authentication failed for user "postgres"
Environment
Operating System: MacOS (M1 - Apple Silicon - ARM64)
This causes authentication error below: 2024-04-24 16:25:40.510 UTC [27] FATAL: password authentication failed for user "postgres"
To resolve this issue, modified the db service environments setup at Docker Compose configuration to adjust the PostgreSQL container's authentication method:
With these change, the PostgreSQL container switches to using the "md5" authentication method, which resolves the authentication failure encountered with the default method.
Thanks for sharing the issue.
I was able to reproduce the error by adding a newline character in the db/password.txt file. Your suggested fix did not resolve the issue caused by the newline character, so your issue is most likely slightly different, but probably associated with the contents of the password.txt file.
You can check your password.txt file for any hidden characters and try a more simple password. Note that you would need to delete the volume to reinitialize.
This section is very error-prone, and does need to be updated.
Thanks for taking the time to reply. I really like open-source docs and projects of docker and the support provided by the docker community.
The problem I mentioned here and your answer might be for different subjects. I tried to explain that if someone skips creating the password.txt file and first runs docker compose up, the database will be initialized without password and this will cause the auth error after creating password and running docker compose up again.
The authentication error: 2024-04-24 16:25:40.510 UTC [27] FATAL: password authentication failed for user "postgres".
I updated my compose.yaml file for db service as I explained in the beginning of the issue. And this solved my auth problem.
Is this a docs issue?
Type of issue
Information is incorrect
Description
When attempting to run a
Docker Compose
setup withtodo-app server
andpostgres
containers, authentication failures happens forPostgreSql
container. (Docker docs: using containers for Node.js development)authentication error
:2024-04-24 16:25:40.510 UTC [27] FATAL: password authentication failed for user "postgres"
Environment
Location
https://docs.docker.com/language/nodejs/develop/
Suggestion
Default
environment
setup fordb
serviceThis causes
authentication error
below:2024-04-24 16:25:40.510 UTC [27] FATAL: password authentication failed for user "postgres"
To resolve this issue, modified the
db
serviceenvironments
setup atDocker Compose
configuration to adjust the PostgreSQL container's authentication method:With these change, the PostgreSQL container switches to using the "md5" authentication method, which resolves the authentication failure encountered with the default method.
PostgreSQL Authentication Methods
I'm adding a PR regarding this issue. #19866
The text was updated successfully, but these errors were encountered: