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

[bitnami/postgresql] Error with Postgres custom user #15378

Open
ktw1016 opened this issue Mar 7, 2023 · 9 comments
Open

[bitnami/postgresql] Error with Postgres custom user #15378

ktw1016 opened this issue Mar 7, 2023 · 9 comments
Labels
in-progress on-hold Issues or Pull Requests with this label will never be considered stale postgresql tech-issues The user has a technical issue about an application

Comments

@ktw1016
Copy link

ktw1016 commented Mar 7, 2023

Name and Version

bitnami/postgresql:12.1.6

What architecture are you using?

None

What steps will reproduce the bug?

Deployed bitnami/postgresql:12.1.6 with this config for auth:

auth:
  enablePostgresUser: true
  username: antimatter_users
  existingSecret: antimatter-iceberg-catalog-db
  secretKeys:
    adminPasswordKey: postgresql-password
    userPasswordKey: postgresql-unprivileged-password
primary:
  extraEnvVars:
    - name: POSTGRES_MAX_CONNECTIONS
      value: "500"
    - name: PGPASSWORD
      valueFrom:
        secretKeyRef:
          key: postgresql-password
          name: antimatter-iceberg-catalog-db

Needed PGPASSWORD environment variable as I'm running a init sql script using postStart lifecycle hook

I can access postgres fine and do all of my operations as expected. Problem is that, in the logs, I'm getting errors:

2023-03-07 20:03:10.162 GMT [452] FATAL:  password authentication failed for user "antimatter_users"
2023-03-07 20:03:10.162 GMT [452] DETAIL:  Connection matched pg_hba.conf line 1: "host     all             all             0.0.0.0/0               md5"

What is the expected behavior?

Log from Postgresql does not contain any errors

What do you see instead?

2023-03-07 20:03:10.162 GMT [452] FATAL:  password authentication failed for user "antimatter_users"
2023-03-07 20:03:10.162 GMT [452] DETAIL:  Connection matched pg_hba.conf line 1: "host     all             all             0.0.0.0/0               md5"
@ktw1016 ktw1016 added the tech-issues The user has a technical issue about an application label Mar 7, 2023
@github-actions github-actions bot added the triage Triage is needed label Mar 7, 2023
@github-actions github-actions bot added in-progress and removed triage Triage is needed labels Mar 8, 2023
@bitnami-bot bitnami-bot assigned corico44 and unassigned carrodher Mar 8, 2023
@corico44
Copy link
Contributor

Hello @ktw1016,

Could you try setting the following value to see if the behavior changes, please?
volumePermissions.enabled=true

I have also found a similar ticket from a while ago in case it can help you:

@github-actions
Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Mar 30, 2023
@github-actions
Copy link

github-actions bot commented Apr 4, 2023

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label Apr 4, 2023
@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2023
@ktw1016
Copy link
Author

ktw1016 commented Apr 12, 2023

Hi @corico44, sorry for late response.
I tried volumePermissions.enabled=true, however, running into issues as the cluster I'm working on prohibits running container as root. Do you have any possible workarounds in mind for this?

@github-actions github-actions bot added triage Triage is needed and removed solved labels Apr 12, 2023
@carrodher carrodher removed stale 15 days without activity triage Triage is needed labels Apr 13, 2023
@carrodher carrodher reopened this Apr 13, 2023
@carrodher carrodher removed their assignment Apr 13, 2023
@bitnami-bot bitnami-bot assigned rafariossaa and unassigned corico44 Apr 13, 2023
@github-actions github-actions bot added triage Triage is needed and removed in-progress labels Apr 13, 2023
@carrodher carrodher assigned corico44 and unassigned rafariossaa Apr 13, 2023
@github-actions github-actions bot added in-progress and removed triage Triage is needed labels Apr 13, 2023
@bitnami-bot bitnami-bot assigned dgomezleon and unassigned corico44 Apr 13, 2023
@carrodher carrodher assigned corico44 and unassigned dgomezleon Apr 13, 2023
@corico44
Copy link
Contributor

Hello @ktw1016,

Have you tried the different solutions that are proposed in #14683?
Like this one for example:

What happens if you install the Helm chart by adding --namespace test --create-namespace so everything is deployed in a brand new namespace: test.

@ktw1016
Copy link
Author

ktw1016 commented Apr 14, 2023

Hi @corico44, I don't permissions to create namespaces in the cluster..

@corico44
Copy link
Contributor

corico44 commented Apr 19, 2023

@ktw1016,

I have found this other similar issue (#8469) where the following is said:

Could you ensure that you are not reusing persistent volumes from other PostgreSQL installations? Make sure that there are no PostgreSQL PVCs because then the password will not match (it will be using a random-generated password from another installation).

Could you check this, please?

@ktw1016
Copy link
Author

ktw1016 commented Apr 20, 2023

@ktw1016,

I have found this other similar issue (#8469) where the following is said:

Could you ensure that you are not reusing persistent volumes from other PostgreSQL installations? Make sure that there are no PostgreSQL PVCs because then the password will not match (it will be using a random-generated password from another installation).

Could you check this, please?

Hi @corico44, I checked and the correct PVC is being used. Also followed the instructions on the linked issue which didn't fix my problems..

@corico44 corico44 changed the title Error with Postgres custom user [bitnami/postgresql] Error with Postgres custom user Apr 27, 2023
@corico44
Copy link
Contributor

Hello @ktw1016,

I have opened an internal task to handle this problem. We will notify you in this ticket with any updates of the task. Thank you!

@corico44 corico44 added the on-hold Issues or Pull Requests with this label will never be considered stale label May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress on-hold Issues or Pull Requests with this label will never be considered stale postgresql tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

6 participants