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: database "repmgr" does not exist #25671

Open
xRTRx opened this issue May 10, 2024 · 3 comments
Open

FATAL: database "repmgr" does not exist #25671

xRTRx opened this issue May 10, 2024 · 3 comments
Assignees
Labels
postgresql-ha tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@xRTRx
Copy link

xRTRx commented May 10, 2024

Name and Version

bitnami/postgresql-ha:14.0.10

What architecture are you using?

amd64

What steps will reproduce the bug?

Kubernetes version: v1.28.6
Helm: v3.13.1

Are you using any custom parameters or values?

--set global.postgresql.username=user1 \
--set global.postgresql.database=db1 \
--set postgresql.audit.logConnections=true \
--set postgresql.audit.logDisconnections=true \
--set pgpool.logConnections=true \
--set pgpool.logPerNodeStatement=true \
--set witness.create=true \
--set witness.audit.logConnections=true \
--set witness.audit.logDisconnections=true \
--set metrics.enabled=true \
--set metrics.serviceMonitor.enabled=true \
--set persistence.enabled=false

What do you see instead?

postgresql-repmgr 11:03:31.32 INFO  ==> 
postgresql-repmgr 11:03:31.33 INFO  ==> Welcome to the Bitnami postgresql-repmgr container
postgresql-repmgr 11:03:31.33 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
postgresql-repmgr 11:03:31.33 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
postgresql-repmgr 11:03:31.34 INFO  ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
postgresql-repmgr 11:03:31.34 INFO  ==> 
postgresql-repmgr 11:03:31.43 INFO  ==> ** Starting PostgreSQL with Replication Manager setup **
postgresql-repmgr 11:03:31.54 INFO  ==> Validating settings in REPMGR_* env vars...
postgresql-repmgr 11:03:31.55 INFO  ==> Validating settings in POSTGRESQL_* env vars..
postgresql-repmgr 11:03:31.56 INFO  ==> Querying all partner nodes for common upstream node...
postgresql-repmgr 11:03:31.82 INFO  ==> There are no nodes with primary role. Assuming the primary role...
postgresql-repmgr 11:03:31.84 INFO  ==> Preparing PostgreSQL configuration...
postgresql-repmgr 11:03:31.84 INFO  ==> postgresql.conf file not detected. Generating it...
postgresql-repmgr 11:03:32.25 INFO  ==> Preparing repmgr configuration...
postgresql-repmgr 11:03:32.34 INFO  ==> Initializing Repmgr...
postgresql-repmgr 11:03:32.34 INFO  ==> Initializing PostgreSQL database...
postgresql-repmgr 11:03:32.35 INFO  ==> Custom configuration /opt/bitnami/postgresql/conf/postgresql.conf detected
postgresql-repmgr 11:03:32.42 INFO  ==> Custom configuration /opt/bitnami/postgresql/conf/pg_hba.conf detected
postgresql-repmgr 11:03:32.52 INFO  ==> Deploying PostgreSQL with persisted data...
postgresql-repmgr 11:03:32.63 INFO  ==> Configuring replication parameters
postgresql-repmgr 11:03:32.75 INFO  ==> Configuring fsync

postgresql-repmgr 11:03:32.83 INFO  ==> ** PostgreSQL with Replication Manager setup finished! **
postgresql-repmgr 11:03:32.94 INFO  ==> Starting PostgreSQL in background...
waiting for server to start....2024-05-10 11:03:33.062 GMT [153] LOG:  pgaudit extension initialized
2024-05-10 11:03:33.128 GMT [153] LOG:  redirecting log output to logging collector process
2024-05-10 11:03:33.128 GMT [153] HINT:  Future log output will appear in directory "/opt/bitnami/postgresql/logs".
2024-05-10 11:03:33.128 GMT [153] LOG:  starting PostgreSQL 16.2 on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-05-10 11:03:33.129 GMT [153] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-05-10 11:03:33.129 GMT [153] LOG:  listening on IPv6 address "::", port 5432
2024-05-10 11:03:33.141 GMT [153] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2024-05-10 11:03:33.160 GMT [157] LOG:  database system was shut down at 2024-05-10 11:03:30 GMT
2024-05-10 11:03:33.172 GMT [153] LOG:  database system is ready to accept connections
 done
server started
2024-05-10 11:03:33.243 GMT [163] LOG:  connection received: host=[local]
postgresql-repmgr 11:03:33.24 INFO  ==> ** Starting repmgrd **
[2024-05-10 11:03:33] [NOTICE] repmgrd (repmgrd 5.4.1) starting up
2024-05-10 11:03:33.264 GMT [166] LOG:  connection received: host=postgresql-ha-postgresql-0.postgresql-ha-postgresql-headless.default.svc.cluster.local port=32870
2024-05-10 11:03:33.340 GMT [166] LOG:  connection authenticated: identity="repmgr" method=md5 (/opt/bitnami/postgresql/conf/pg_hba.conf:1)
2024-05-10 11:03:33.340 GMT [166] LOG:  connection authorized: user=repmgr database=repmgr application_name=repmgr
2024-05-10 11:03:33.340 GMT [166] FATAL:  database "repmgr" does not exist
[2024-05-10 11:03:33] [ERROR] connection to database failed
[2024-05-10 11:03:33] [DETAIL] 
connection to server at "postgresql-ha-postgresql-0.postgresql-ha-postgresql-headless.default.svc.cluster.local" (10.233.96.193), port 5432 failed: FATAL:  database "repmgr" does not exist

[2024-05-10 11:03:33] [DETAIL] attempted to connect using:
  user=repmgr password=Iqo2VU54uk connect_timeout=5 dbname=repmgr host=postgresql-ha-postgresql-0.postgresql-ha-postgresql-headless.default.svc.cluster.local port=5432 fallback_application_name=repmgr options=-csearch_path=

Additional information

If I remove these parameters everything starts working

  • global.postgresql.username=user1
  • global.postgresql.database=db1
@xRTRx xRTRx added the tech-issues The user has a technical issue about an application label May 10, 2024
@github-actions github-actions bot added the triage Triage is needed label May 10, 2024
@carrodher
Copy link
Member

The issue may not be directly related to the Bitnami container image or Helm chart, but rather to how the application is being utilized or configured in your specific environment.

Having said that, 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.

If you have any questions about the application itself, customizing its content, or questions about technology and infrastructure usage, 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.

@8ball030
Copy link

I additionally experienced this
Would love to knwo what i am doing wrong

@AminMkh
Copy link

AminMkh commented May 26, 2024

yep, same problem here:
chart version: postgresql-ha:14.1.2

if i pass custom credentials, it doesn't work, if I leave empty, it works.

  postgresql:
    username: someusername
    password: somepassword

    repmgrUsername: someusername2
    repmgrPassword: somepassword2
  pgpool:
    adminUsername: somepassword3
    adminPassword: somepassword3

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

No branches or pull requests

4 participants