zalando / zalando/postgres-operator
FATAL: password authentication failed for user "standby"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Please, answer some short questions which should help us to understand your problem / question better?
- Which image of the operator are you using?
- v1.8.2
- Where do you run it - cloud or metal? Kubernetes or OpenShift? [AWS K8s | GCP ... | Bare Metal K8s]
- Kubernetes
- Are you running Postgres Operator in production? [yes | no]
- no
- Type of issue? [Bug report, question, feature request, etc.]
question:
I want to use the standby cluster so I just use the demo from manifests.
First, I create a cluster like this: kubectl create -f manifests/minimal-postgres-manifest.yaml
Second, I create a standby like this: kubectl create -f manifests/standby-manifest.yaml
meet an error-log but I don't know what happened and how to fix it.
Error log like this:
2022-11-10 13:37:57,484 INFO: Selected new K8s API server endpoint https://172.16.3.44:6443
2022-11-10 13:37:57,544 INFO: No PostgreSQL configuration items changed, nothing to reload.
2022-11-10 13:37:57,551 INFO: Lock owner: None; I am acid-standby-cluster-0
2022-11-10 13:37:57,680 INFO: trying to bootstrap a new standby leader
pg_basebackup: error: connection to server at "acid-minimal-cluster.default" (192.168.233.209), port 5432 failed: FATAL: password authentication failed for user "standby"
password retrieved from file "/run/postgresql/pgpass"
connection to server at "acid-minimal-cluster.default" (192.168.233.209), port 5432 failed: FATAL: no pg_hba.conf entry for replication connection from host "192.168.234.99", user "standby", no encryption
pg_basebackup: error: connection to server at "acid-minimal-cluster.default" (192.168.233.209), port 5432 failed: FATAL: password authentication failed for user "standby"
password retrieved from file "/run/postgresql/pgpass"
connection to server at "acid-minimal-cluster.default" (192.168.233.209), port 5432 failed: FATAL: no pg_hba.conf entry for replication connection from host "192.168.234.99", user "standby", no encryption
2022-11-10 13:38:08,070 INFO: Lock owner: None; I am acid-standby-cluster-0
2022-11-10 13:38:08,070 INFO: not healthy enough for leader race
2022-11-10 13:38:08,108 INFO: bootstrap_standby_leader in progress
2022-11-10 13:38:18,063 INFO: Lock owner: None; I am acid-standby-cluster-0
2022-11-10 13:38:18,063 INFO: not healthy enough for leader race
2022-11-10 13:38:18,064 INFO: bootstrap_standby_leader in progress
pg_basebackup: error: connection to server at "acid-minimal-cluster.default" (192.168.233.209), port 5432 failed: FATAL: password authentication failed for user "standby"
password retrieved from file "/run/postgresql/pgpass"
connection to server at "acid-minimal-cluster.default" (192.168.233.209), port 5432 failed: FATAL: no pg_hba.conf entry for replication connection from host "192.168.234.99", user "standby", no encryption
2022-11-10 13:38:28,052 ERROR: Error creating replica using method basebackup_fast_xlog: /scripts/basebackup.sh exited with code=1
2022-11-10 13:38:28,052 ERROR: failed to bootstrap clone from remote master postgresql://acid-minimal-cluster.default:5432
2022-11-10 13:38:28,053 INFO: Removing data directory: /home/postgres/pgdata/pgroot/data
2022-11-10 13:38:28,065 INFO: Lock owner: None; I am acid-standby-cluster-0
2022-11-10 13:38:28,065 INFO: not healthy enough for leader race
2022-11-10 13:38:28,143 INFO: bootstrap_standby_leader in progress
2022-11-10 13:38:38,073 INFO: removing initialize key after failed attempt to bootstrap the cluster
Traceback (most recent call last):
File "/usr/local/bin/patroni", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/patroni/__main__.py", line 143, in main
return patroni_main()
File "/usr/local/lib/python3.6/dist-packages/patroni/__main__.py", line 135, in patroni_main
abstract_main(Patroni, schema)
File "/usr/local/lib/python3.6/dist-packages/patroni/daemon.py", line 100, in abstract_main
controller.run()
File "/usr/local/lib/python3.6/dist-packages/patroni/__main__.py", line 105, in run
super(Patroni, self).run()
File "/usr/local/lib/python3.6/dist-packages/patroni/daemon.py", line 59, in run
self._run_cycle()
File "/usr/local/lib/python3.6/dist-packages/patroni/__main__.py", line 108, in _run_cycle
logger.info(self.ha.run_cycle())
File "/usr/local/lib/python3.6/dist-packages/patroni/ha.py", line 1514, in run_cycle
info = self._run_cycle()
File "/usr/local/lib/python3.6/dist-packages/patroni/ha.py", line 1388, in _run_cycle
return self.post_bootstrap()
File "/usr/local/lib/python3.6/dist-packages/patroni/ha.py", line 1280, in post_bootstrap
self.cancel_initialization()
File "/usr/local/lib/python3.6/dist-packages/patroni/ha.py", line 1273, in cancel_initialization
raise PatroniFatalException('Failed to bootstrap cluster')
patroni.exceptions.PatroniFatalException: 'Failed to bootstrap cluster'
/etc/runit/runsvdir/default/patroni: finished with code=1 signal=0
/etc/runit/runsvdir/default/patroni: sleeping 30 seconds
thank you for your response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing manifests/minimal-postgres-manifest.yaml and manifests/standby-manifest.yaml, then reproduce the two kubectl create commands. Compare the standby bootstrap logs with the PostgreSQL replication configuration; done means identifying the configuration mismatch and documenting a verified correction for the demo manifests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, postgresql
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100