Here are some helpful considerations when filing a bug:
-
What version of apnscp are you running?
cpcmd not found (Fresh install) -
Which version of RHEL or CentOS are you using?
AlmaLinux release 10.1 (Heliotrope Lion) -
Can you reproduce this bug reliably?
- Fresh install on an AWS EC2 instance running AlmaLinux 10.x.
- curl https://raw.githubusercontent.com/apisnetworks/apiscp-bootstrapper/master/bootstrap.sh | bash
- Profit (or not…)
- Enable debug mode (
cpcmd config_set apnscp.debug true). Restart backend by hand,
cd /usr/local/apnscp/bin ; ./bin/apnscpd -f restart
RUNNING HANDLER [common : Restart postgresql] ***************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => changed=false
msg: |-
Unable to restart service postgresql: Job for postgresql-16.service failed because the control process exited with error code.
See “systemctl status postgresql-16.service” and “journalctl -xeu postgresql-16.service” for details.
PLAY RECAP **************************************************************************************************************************************************************************************************************************************************
localhost : ok=200 changed=2 unreachable=0 failed=1 skipped=142 rescued=0 ignored=0
[root@ip-172-31-17-132 playbooks]# sed -n ‘603p’ /var/lib/pgsql/16/data/postgresql.conf
log_timezone = …/…/…/etc/localtime
[root@ip-172-31-17-132 playbooks]# systemctl status postgresql-16
× postgresql-16.service - PostgreSQL 16 database server
Loaded: loaded (/usr/lib/systemd/system/postgresql-16.service; indirect; preset: disabled)
Drop-In: /etc/systemd/system/postgresql-16.service.d
└─override.conf
Active: failed (Result: exit-code) since Sat 2026-01-31 02:19:16 UTC; 1min 3s ago
Duration: 4min 43.535s
Invocation: 0931007c91fa48a99890880a30dd0b74
Docs: PostgreSQL: Documentation: 16: PostgreSQL 16.11 Documentation
Process: 15117 ExecStartPre=/usr/pgsql-16/bin/postgresql-16-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Process: 15124 ExecStart=/usr/pgsql-16/bin/postgres -D ${PGDATA} (code=exited, status=1/FAILURE)
Main PID: 15124 (code=exited, status=1/FAILURE)
Mem peak: 2.3M
CPU: 18ms
Jan 31 02:19:16 ip-172-31-17-132.us-east-2.compute.internal systemd[1]: Starting postgresql-16.service - PostgreSQL 16 database server…
Jan 31 02:19:16 ip-172-31-17-132.us-east-2.compute.internal postgres[15124]: 2026-01-31 02:19:16.513 GMT [15124] LOG: syntax error in file “/var/lib/pgsql/16/data/postgresql.conf” line 603, near token “.”
Jan 31 02:19:16 ip-172-31-17-132.us-east-2.compute.internal postgres[15124]: 2026-01-31 02:19:16.514 GMT [15124] FATAL: configuration file “/var/lib/pgsql/16/data/postgresql.conf” contains errors
Jan 31 02:19:16 ip-172-31-17-132.us-east-2.compute.internal systemd[1]: postgresql-16.service: Main process exited, code=exited, status=1/FAILURE
Jan 31 02:19:16 ip-172-31-17-132.us-east-2.compute.internal systemd[1]: postgresql-16.service: Failed with result ‘exit-code’.
Jan 31 02:19:16 ip-172-31-17-132.us-east-2.compute.internal systemd[1]: Failed to start postgresql-16.service - PostgreSQL 16 database server.
[root@ip-172-31-17-132 playbooks]# cpcmd misc_cp_version
-bash: cpcmd: command not found
[root@ip-172-31-17-132 playbooks]# cat /etc/redhat-release
AlmaLinux release 10.1 (Heliotrope Lion)
If I change it to ‘UTC’ postgres starts fine, but then I run:
cd /usr/local/apnscp/resources/playbooks && env ANSIBLE_LOG_PATH=/root/apnscp-bootstrapper.log BOOTSTRAP_SH=/root/resume_apnscp_setup.sh ansible-playbook -l localhost -c local bootstrap.yml
and it changes it back and fails again.