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

NAS-118354 / 22.12 / Fix root user not exist error in nextcloud postgres logs #769

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

Qubad786
Copy link
Contributor

@Qubad786 Qubad786 commented Oct 3, 2022

Context

Before starting nextcloud container, we waited on postgres container to be active and responsive so we use pg_isready utility to determine that. However we had erroneous logs being logged in that case which do not affect application usability but were still being logged

2022-09-29T19:59:30.454167564Z 2022-09-29 19:59:30.454 UTC [1] LOG:  database system is ready to accept connections
2022-09-29T19:59:32.102969839Z 2022-09-29 19:59:32.102 UTC [84] FATAL:  password authentication failed for user "root"
2022-09-29T19:59:32.103024478Z 2022-09-29 19:59:32.102 UTC [84] DETAIL:  Role "root" does not exist.
2022-09-29T19:59:32.103041832Z 	Connection matched pg_hba.conf line 99: "host all all all md5"

It seems this is an upstream issue and we can workaround it by explicitly defining which database we are going to connect to peter-evans/docker-compose-healthcheck#16.

Solution

Refactor pg_isready command to explicitly list down database which we will be connecting to which results in the erroneous logs not being logged for postgres.

@Qubad786 Qubad786 requested a review from a team October 3, 2022 15:22
@bugclerk bugclerk changed the title Fix root user not exist error in nextcloud postgres logs NAS-118354 / 22.12 / Fix root user not exist error in nextcloud postgres logs Oct 3, 2022
@bugclerk
Copy link
Contributor

bugclerk commented Oct 3, 2022

@Qubad786 Qubad786 merged commit c4a5f4f into master Oct 3, 2022
@Qubad786 Qubad786 deleted the NAS-118354 branch October 3, 2022 15:39
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

Successfully merging this pull request may close these issues.

3 participants