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

Error messages from prometheus-exporter container #27858

Closed
jankoh opened this issue Jul 9, 2024 · 2 comments
Closed

Error messages from prometheus-exporter container #27858

jankoh opened this issue Jul 9, 2024 · 2 comments
Assignees
Labels
postgresql solved tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@jankoh
Copy link

jankoh commented Jul 9, 2024

Name and Version

bitnami/postgresql 15.5.14

What architecture are you using?

amd64

What steps will reproduce the bug?

We configured the Bitnami PostgreSQL chart to export metrics for our Prometheus service. While this works with a new deployment to a clean namespace, I figured that our development namespace started throwing errors after updating to 15.5.14 from 15.5.13. I'm not completely sure if it is strongly related since the error messages started a couple of hours after the rollout:

ts=2024-07-06T13:16:47.257Z caller=server.go:74 level=info msg="Established new database connection" fingerprint=127.0.0.1:5432
ts=2024-07-06T13:16:47.695Z caller=collector.go:176 level=error msg="Error opening connection to database" err="error querying postgresql version: pq: database \"myUser\" does not exist"
ts=2024-07-06T13:16:48.495Z caller=postgres_exporter.go:682 level=error err="Error opening connection to database (postgresql:https://myUser:[email protected]:5432/?sslmode=disable): pq: database \"myUser\" does not exist"

Are you using any custom parameters or values?

We have set the following (skipped irrelevant parts):

postgres:
  auth:
    database: "service-database"
    username: "myUser"
    password: "secret"
  image:
    tag: "15"
  metrics:
    containerSecurityContext:
      enabled: true
      runAsGroup: 1001
    enabled: true
    serviceMonitor:
      enabled: true

What is the expected behavior?

We'd expect to find error messages in the logs.

What do you see instead?

We get those messages. Maybe it's due to auto-collecting database information from the exporter itself. So maybe the bug is within this tool itself, not the chart.

@jankoh jankoh added the tech-issues The user has a technical issue about an application label Jul 9, 2024
@github-actions github-actions bot added the triage Triage is needed label Jul 9, 2024
@carrodher
Copy link
Member

The issue may not be directly related to the Bitnami container image/Helm chart, but rather to how the application is being utilized, configured in your specific environment, or tied to a specific scenario that is not easy to reproduce on our side.

If you think that's not the case and are interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Suppose you have any questions about the application, customizing its content, or technology and infrastructure usage. In that case, we highly recommend that you refer to the forums and user guides provided by the project responsible for the application or technology.

With that said, we'll keep this ticket open until the stale bot automatically closes it, in case someone from the community contributes valuable insights.

@jankoh
Copy link
Author

jankoh commented Jul 10, 2024

Well, the error indeed had to do with the Bitnami Chart. With 15.5.15 the error vanished. Source of the culprit was the line:

          env:
            - name: DATA_SOURCE_URI
              value: {{ printf "127.0.0.1:%d/?sslmode=disable" (int (include "postgresql.v1.service.port" .)) }}

in statefulset.yaml. The fix came with #27734, so thank you @KorenP1 😃

I'll close this as resolved.

Best, Jan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postgresql solved tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants