vPostgres service fails to start with Fatal error : bogus postmaster.pid
search cancel

vPostgres service fails to start with Fatal error : bogus postmaster.pid

book

Article ID: 319991

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • vPostgres service fails to start :- # service-control --start vmware-vpostgres
Perform start operation. vmon_profile=None, svc_names=['vmware-vpostgres'], include_coreossvcs=False, include_leafossvcs=False
2019-11-06T21:38:14.283Z   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,

/var/log/vmware/vpostgres/serverlog.stderr log content :-
~
~
Starting service process with pid: 61183.
LOG:  skipping missing configuration file "/storage/db/vpostgres/postgresql.conf.repl"
LOG:  skipping missing configuration file "/storage/db/vpostgres/postgresql.conf.repl"
2019-11-06 21:38:14.700 UTC 5dc33d46.eeff 0   FATAL:  bogus data in lock file "postmaster.pid": ""


Cause

This issue occurs due to corrupted postmaster.pid file.

Resolution

Location of the postmaster.pid file :-

# ls -l /storage/db/vpostgres/postmaster.pid
-rw------- 1 vpostgres users 45 Oct 30 17:20 /storage/db/vpostgres/postmaster.pid

Try to cat/less on the postmaster.pid file, it will have junk characters.

Move the postmaster.pid file to backup or some other folder
# mv /storage/db/vpostgres/postmaster.pid /storage/db/vpostgres/postmaster.pid_bkp

You should be able to start the vPostgres service now and see a new pid file automatically getting created.

Note :- Please do not delete the file, and take proper snapshot/backup before making changes.