Error: "psql.bin: error: fe_sendauth: no password supplied" while trying to start the vmware-certificatemanagement service in vCenter Server.
search cancel

Error: "psql.bin: error: fe_sendauth: no password supplied" while trying to start the vmware-certificatemanagement service in vCenter Server.

book

Article ID: 413264

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • While trying to start the vmware-certificatemanagement service in vCenter Server, it fails with an error "no password supplied".
  • In the /var/log/vmware/vmon/vmon.log, we see that certificatemanagement service pre-start is failing when trying to access the vpostgres SQL database.

    [YYYY-MM-DDTHH:MM:SS] In(05) host-###### Received start request for certificatemanagement
    [YYYY-MM-DDTHH:MM:SS] In(05) host-###### <certificatemanagement-prestart> Constructed command: /usr/bin/python less
    [YYYY-MM-DDTHH:MM:SS] Wa(03) host-###### <certificatemanagement> Service pre-start command's stderr: [YYYY-MM-DDTHH:MM:SS]  Invoked command: ['/opt/vmware/vpostgres/current/bin/psql', '-U', 'postgres', '-d', 'VCDB', '-f', '/usr/lib/vmware-hvc/scripts/db/hvc_user_tables_init.sql', '-p', '5432', '-v', 'subscriptions_table_name=certmgmt_service_subscribable', '-v', 'sync_replica_table_name=certmgmt_sync_replica_metadata', '-v', 'HybridVC_SyncaaS=True', '-v', 'sync_item_table_name=certmgmt_sync_item_metadata', '-v', 'sync_item_extra_colums=hashcode integer UNIQUE, local_id VARCHAR(256) UNIQUE', '-w', '-X']
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-###### [YYYY-MM-DDTHH:MM:SS]  RC = 2
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-###### Stdout =
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-###### Stderr = psql.bin: error: fe_sendauth: no password supplied
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######
    [YYYY-MM-DDTHH:MM:SS] Wa(03) host-###### <certificatemanagement> Service pre-start command's stderr: Traceback (most recent call last):
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######   File "/usr/lib/vmware-certificatemanagement/scripts/certificatemanagement_prestart.py", line 238, in <module>
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######     create_certsyncaas_tables()
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######   File "/usr/lib/vmware-certificatemanagement/scripts/certificatemanagement_prestart.py", line 228, in create_certsyncaas_tables
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######     raise e
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######   File "/usr/lib/vmware-certificatemanagement/scripts/certificatemanagement_prestart.py", line 222, in create_certsyncaas_tables
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######     certmgr_std_out = invoke_command(cmd)
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######   File "/usr/lib/vmware/site-packages/cis/utils.py", line 373, in invoke_command
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######     (cmd, stderr))
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-###### cis.exceptions.InvokeCommandException: {
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######     "detail": [
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######         {
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######             "id": "install.ciscommon.command.errinvoke",
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######             "translatable": "An error occurred while invoking external command : '%(0)s'",
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######             "args": [
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######                 "Command: ['/opt/vmware/vpostgres/current/bin/psql', '-U', 'postgres', '-d', 'VCDB', '-f', '/usr/lib/vmware-hvc/scripts/db/hvc_user_tables_init.sql', '-p', '5432', '-v', 'subscriptions_table_name=certmgmt_service_subscribable', '-v', 'sync_replica_table_name=certmgmt_sync_replica_metadata', '-v', 'HybridVC_SyncaaS=True', '-v', 'sync_item_table_name=certmgmt_sync_item_metadata', '-v', 'sync_item_extra_colums=hashcode integer UNIQUE, local_id VARCHAR(256) UNIQUE', '-w', '-X']\nStderr: psql.bin: error: fe_sendauth: no password supplied\n"
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######             ],
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######             "localized": "An error occurred while invoking external command : 'Command: ['/opt/vmware/vpostgres/current/bin/psql', '-U', 'postgres', '-d', 'VCDB', '-f', '/usr/lib/vmware-hvc/scripts/db/hvc_user_tables_init.sql', '-p', '5432', '-v', 'subscriptions_table_name=certmgmt_service_subscribable', '-v', 'sync_replica_table_name=certmgmt_sync_replica_metadata', '-v', 'HybridVC_SyncaaS=True', '-v', 'sync_item_table_name=certmgmt_sync_item_metadata', '-v', 'sync_item_extra_colums=hashcode integer UNIQUE, local_id VARCHAR(256) UNIQUE', '-w', '-X']\nStderr: psql.bin: error: fe_sendauth: no password supplied\n'"
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######         }
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######     ],
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######     "componentKey": null,
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######     "problemId": null,
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######     "resolution": null
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-###### }
    [YYYY-MM-DDTHH:MM:SS] Wa(03)+ host-######
    [YYYY-MM-DDTHH:MM:SS] Er(02) host-###### <certificatemanagement> Service pre-start command failed with exit code 1.

Environment

  • VMware vCenter Server 8

Cause

  • This issue occurs when the .pgpass file in the /root directory is not available on the vCenter Server Appliance.

Resolution

To resolve this issue:

  • Check for .pgpass file under /root folder. If not available, proceed with below steps to recreate the file:

    • Login to the vCenter Server appliance using SSH.
    • Execute the command ls /root/ -larth to verify the file's presence.
Note: Take a Snapshot of the vCenter Server Appliance before proceeding with the steps below. If the vCenter Server is part of ELM, take offline snapshots of all the vCenter Server which is part of ELM. Please refer to Snapshot Best practices for vCenter Server Virtual Machines.
  • Copy PGUSER Password from the /etc/vmware-vpx/embedded_db.cfg file.
For example:
 
root@vcenter [ / ]# cat /etc/vmware-vpx/embedded_db.cfg | grep PGUSER_PASSWORD
PGUSER_PASSWORD='PG-PASSWORD'
  • Create the .pgpass file under /root with the new password:

    • touch /root/.pgpass
    • chmod 600 /root/.pgpass
    • vi /root/.pgpass
    • Press Insert Key and Copy contents below to the file, replace PASSWORD with the password copied from the above step, and press ESC Key and wq! to save the file and exit the VI editor.
localhost:5432:postgres:postgres:PASSWORD
127.0.0.1:5432:postgres:postgres:PASSWORD
localhost:5432:VCDB:postgres:PASSWORD
127.0.0.1:5432:VCDB:postgres:PASSWORD
/var/run/vpostgres:5432:*:postgres:PASSWORD
  • Restart all the vCenter server services.

    • service-control --stop --all && service-control --start --all

  • Check the vmware-certificatemanagement service status by running the command.

    • service-control --status vmware-certificatemanagement