vPostgres service fails to start on vCenter Server Appliance
search cancel

vPostgres service fails to start on vCenter Server Appliance

book

Article ID: 415909

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • vPostgres service is in a stopped state.
  • When try to start the service manually we get the following error trace :
Operation not cancellable. Please wait for it to finish...
Performing start operation on service vmware-vpostgres...
Error executing start on service vmware-vpostgres. Details {
    "detail": [
        {
            "args": [
                "vmware-vpostgres"
            ],
            "id": "install.ciscommon.service.failstart",
            "translatable": "An error occurred while starting service '%(0)s'",
            "localized": "An error occurred while starting service 'vmware-vpostgres'"
        }
    ],
    "componentKey": null,
    "resolution": null,
    "problemId": null
}
Service-control failed. Error: {
    "detail": [
        {
            "args": [
                "vmware-vpostgres"
            ],
            "id": "install.ciscommon.service.failstart",
            "translatable": "An error occurred while starting service '%(0)s'",
            "localized": "An error occurred while starting service 'vmware-vpostgres'"
        }
    ],
    "componentKey": null,
    "resolution": null,
    "problemId": null

Environment

VMware vCenter Server 7.x

VMware vCenter Server 8.x

Cause

  • vpostgres service cannot access  /var/run/vpostgres due to incorrect permission
  • Checking the /var/log/vmware/vpostgres/serverlog.stderr we find the following:


YYYY-MM-DDTHH:MM:SS UTC 68ff5f73.3ea4cb 0    4105419 37LOG:  starting PostgreSQL 14.15 (VMware Postgres 14.15.0-24573043 release) on x86_64-pc-linux-gnu, compiled by x86_64-vmk-linux-gnu-gcc (GCC) 6.4.0, 64-bit
YYYY-MM-DDTHH:MM:SS UTC 68ff5f73.3ea4cb 0    4105419 38LOG:  listening on IPv4 address "0.0.0.0", port 5432
YYYY-MM-DDTHH:MM:SS UTC 68ff5f73.3ea4cb 0    4105419 39LOG:  listening on IPv6 address "::", port 5432
YYYY-MM-DDTHH:MM:SS UTC 68ff5f73.3ea4cb 0    4105419 40FATAL:  could not create lock file "/var/run/vpostgres/.s.PGSQL.5432.lock": Permission denied
YYYY-MM-DDTHH:MM:SS UTC 68ff5f73.3ea4cb 0    4105419 41LOG:  database system is shut down
YYYY-MM-DDTHH:MM:SS UTC 68ff6087.3eb1b3 0    4108723 37LOG:  starting PostgreSQL 14.15 (VMware Postgres 14.15.0-24573043 release) on x86_64-pc-linux-gnu, compiled by x86_64-vmk-linux-gnu-gcc (GCC) 6.4.0, 64-bit
YYYY-MM-DDTHH:MM:SS UTC 68ff6087.3eb1b3 0    4108723 38LOG:  listening on IPv4 address "0.0.0.0", port 5432
YYYY-MM-DDTHH:MM:SS UTC 68ff6087.3eb1b3 0    4108723 39LOG:  listening on IPv6 address "::", port 5432
YYYY-MM-DDTHH:MM:SS UTC 68ff6087.3eb1b3 0    4108723 40FATAL:  could not create lock file "/var/run/vpostgres/.s.PGSQL.5432.lock": Permission denied
YYYY-MM-DDTHH:MM:SS UTC 68ff6087.3eb1b3 0    4108723 41LOG:  database system is shut down

 

Resolution

Update permissions on /var/run/vpostgres

  • chmod 775 /var/run/vpostgres
  • chown vpostgres:vpgmongrp /var/run/vpostgres