zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.34k stars 979 forks source link

postgresql.conf missing #1047

Closed StephenLiuYa closed 4 years ago

StephenLiuYa commented 4 years ago

I run the compelete demo, but get error shown blew:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/async_executor.py", line 97, in run
    wakeup = func(*args) if args else func()
  File "/usr/local/lib/python3.6/dist-packages/patroni/postgresql/__init__.py", line 645, in restart
    ret = self.stop(block_callbacks=True) and self.start(timeout, task, True, role)
  File "/usr/local/lib/python3.6/dist-packages/patroni/postgresql/__init__.py", line 423, in start
    self.config.write_postgresql_conf(configuration)
  File "/usr/local/lib/python3.6/dist-packages/patroni/postgresql/config.py", line 416, in write_postgresql_conf
    os.rename(self._postgresql_conf, self._postgresql_base_conf)
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/pgdata/pgroot/data/postgresql.conf' -> '/home/postgres/pgdata/pgroot/data/postgresql.base.conf'
/var/run/postgresql:5432 - no response
2020-07-08 07:07:19,716 INFO: Lock owner: None; I am acid-test-cluster-0

How to get the postgresql.conf file

FxKu commented 4 years ago

Where do you run the operator on? Have you tried the whole satup more than once?

ReSearchITEng commented 4 years ago

@StephenLiuYa For beginning it might be better to use the helm chart instead of putting manifests manually.

MatthiasLohr commented 11 months ago

What was the cause of the missing postgresql.conf file? I'm currently experiencing a similar problem, see #2151.