Search the VMware Knowledge Base (KB)
View by Article ID

Starting vPostgres fails after vCenter Server Appliance failure (2106584)

  • 2 Ratings

Symptoms

After vCenter Server Appliance(VCSA) fails, you experience these symptoms:
  • vPostgres database fails to start
  • There are no log entries in the /storage/db/vpostgres/pg_log file
  • Unable to start the database using this command
/etc/init.d/vmware-vpostgres 

Resolution

To resolve the issue, modify the postgres user shell.

To modify the postgres user shell:
  1. Log in to the VCSA as the root user.

    Note: This procedure modifies the database and the password file. Take a backup of each before proceeding to enable your ability to roll back the state of these files.

  2. Open the /etc/passwd file using vi.

  3. Locate the postgres user shell with /bin/false entry using this command:

    /^postgres:

    You see this postgres user entry:

    postgres:x:1000:100::/opt/vmware/vpostgres/9.0:/bin/false

  4. Run these commands to modify the postgres user shell from /bin/false to /bin/bash:

    /false
    cwbash[ESC}

    You see the modified postgres user entry:

    postgres:x:1000:100::/opt/vmware/vpostgres/9.0:/bin/bash

  5. Write the modified file out and exit the editor.

  6. Run this command to change the log in to postgres user:

    su postgres

  7. Run this command to start the database:
/opt/vmware/vpostgres/9.0/bin/pg_ctl start -D /storage/db/vpostgres

If the database does not start, you may see an error similar to:

<YYYY-MM-DD><TIME>db: pid:6334 FATAL: bogus data in lock file "/tmp/.s.PGSQL.xxxx.lock": "ÊþÀÀ"

To resolve this error, move the lock file to /tmp file and then start the database.

To move the lock file to /tmp file:
  1. Run this command to create new a folder:

    mkdir /tmp/old

  2. Run this command to move /tmp/.sPGSQL.xxxx.lock to /tmp/old:

    mv /tmp/.sPGSQL.xxxx.lock /tmp/old

  3. Run this command to start the database:
/opt/vmware/vpostgres/9.0/bin/pg_ctl start -D /storage/db/vpostgres

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 2 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 2 Ratings
Actions
KB: