When attempting to start vPostgres service, you see errors similar to:
#service-control --start vmware-vpostgres
Perform start operation. vmon_profile=None, svc_names=['vmware-vpostgres'], include_coreossvcs=False, include_leafossvcs=False
YYYY-MM-DD_THH:MM:SSZ Service vmware-vpostgres state STOPPED
Error executing start on service vmware-vpostgres. Details {
"resolution": null,
"detail": [
{
"args": [
"vmware-vpostgres"
],
"id": "install.ciscommon.service.failstart",
"localized": "An error occurred while starting service 'vmware-vpostgres'",
"translatable": "An error occurred while starting service '%(0)s'"
}
],
"componentKey": null,
"problemId": null
}
Service-control failed. Error {
"resolution": null,
"detail": [
{
"args": [
"vmware-vpostgres"
],
"id": "install.ciscommon.service.failstart",
"localized": "An error occurred while starting service 'vmware-vpostgres'",
"translatable": "An error occurred while starting service '%(0)s'"
}
],
"componentKey": null,
"problemId": null
}
In /var/log/vmware/vpostgres/serverlog.stderr
on the vCenter Server Appliance, you see errors similar to:
LOG: syntax error in file "/storage/db/vpostgres/postgresql.conf.auto" line 1, near token ""
LOG: syntax error in file "/storage/db/vpostgres/postgresql.conf.auto" line 2, near token ""
LOG: syntax error in file "/storage/db/vpostgres/postgresql.conf.auto" line 3, near token ""
LOG: syntax error in file "/storage/db/vpostgres/health_status_worker.conf" line 1, near token ""
LOG: syntax error in file "/storage/db/vpostgres/health_status_worker.conf" line 2, near token ""
LOG: syntax error in file "/storage/db/vpostgres/health_status_worker.conf" line 3, near token ""
LOG: syntax error in file "/storage/db/vpostgres/health_status_worker.conf" line 4, near token ""
LOG: skipping missing configuration file "/storage/db/vpostgres/postgresql.conf.repl"
FATAL: configuration file "/storage/db/vpostgres/postgresql.conf" contains errors
VMware vCenter Server 6.7.x
VMware vCenter Server 7.x
VMware vCenter Server 8.x
This is due to corrupted postgresql.conf.auto
, postgresql.conf
and health_status_worker.conf
files in /storage/db/vpostgres/ directory.
To resolve the issue, follow the below steps:
postgresql.conf.auto
file example:
# /storage/db/vpostgres/postgresql.conf.auto
# File automatically generated at vPostgres firstboot
# Do not update manually
maintenance_work_mem = '201 MB'
work_mem = '420 kB'
temp_buffers = '840 kB'
shared_buffers = '1008 MB'
max_wal_size = '17512 MB'
min_wal_size = '17512 MB'
max_connections = 737
health_status_worker.conf
file example:
health_status_worker.naptime = 30
health_status_worker.expiration_time = 90
health_status_worker.log = true
health_status_worker.status_file_path = '/dev/shm/vmware-postgres-health-status.xml'
health_status_worker.memory_allowed = '2018 MB'
health_status_worker.disk_space_threshold = 0.05
health_status_worker.disk_space_log_threshold = 0.05
health_status_worker.disk_space_wal_threshold = 0.2
health_status_worker.status_file_group = 'vpgmongrp'
health_status_worker.memory_file_path = '/sys/fs/cgroup/memory/system.slice/vmware-vpostgres.service/memory.stat'
health_status_worker.memory_flag = 'rss'
health_status_worker.replication_slot_check = true
health_status_worker.replication_slot_drop_threshold = 0.9
health_status_worker.replication_slot_force_checkpoint = on
postgresql.conf
file is vcenter specific so should be referenced but not copied directly.Note:
The contents of the postgresql.conf.auto file will be auto updated with new values when vpostgres starts.