autobase: deploy_pgcluster.yml stucks at Wait for port 8008 to become open on the host job

Hello. I’m new to patroni cluster, and trying to install cluster on 3 local VM with existing consul cluster without balancer. I have 3 VMs, one is in master state and two is replicas. All VMs has same variable: postgresql_exists: false

Almost all variables are default, excluding postgresql_data_dir: postgresql_data_dir: "/data/{{ postgresql_version }}/{{ postgresql_cluster_name }}"

When I run deploy_pgcluster.yml playbook, play stucks at Wait for port 8008 to become open on the host job.

I see 8008 port opened on host: tcp LISTEN 0 5 0.0.0.0:8008 0.0.0.0:* users:(("patroni",pid=52434,fd=4)) but postgresql is not started properly, I see such error in journalctl

Sep 04 12:59:57 host postgresql@16-main[49898]: Error: /usr/lib/postgresql/16/bin/pg_ctl /usr/lib/postgresql/16/bin/pg_ctl start -D /data/16/main -l /var/log/postgresql/postgresql-16-main.log -s -o  -c config_file="/etc/postgresql/16/main/postgresql.conf" exited with status 1:
Sep 04 12:59:57 host postgresql@16-main[49898]: pg_ctl: directory "/data/16/main" is not a database cluster directory
Sep 04 12:59:57 host systemd[1]: postgresql@16-main.service: Can't open PID file /run/postgresql/16-main.pid (yet?) after start: No such file or directory

As i get it suggests that postgresql wasn’t initialized, so /data/16/main directory is empty.

How to fix this? Maybe I’ve missed any variables?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (11 by maintainers)

Most upvoted comments

This command helped to remove existed patroni installation. After reinstall everything is ok.

Thanks so much for help