vmware-certificatemanagement service in vCenter Server, it fails with an error "no password supplied"./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..pgpass file in the /root directory is not available on the vCenter Server Appliance.To resolve this issue:
.pgpass file under /root folder. If not available, proceed with below steps to recreate the file:ls /root/ -larth to verify the file's presence.PGUSER Password from the /etc/vmware-vpx/embedded_db.cfg file.root@vcenter [ / ]# cat /etc/vmware-vpx/embedded_db.cfg | grep PGUSER_PASSWORDPGUSER_PASSWORD='PG-PASSWORD'touch /root/.pgpasschmod 600 /root/.pgpassvi /root/.pgpasslocalhost:5432:postgres:postgres:PASSWORD127.0.0.1:5432:postgres:postgres:PASSWORDlocalhost:5432:VCDB:postgres:PASSWORD127.0.0.1:5432:VCDB:postgres:PASSWORD/var/run/vpostgres:5432:*:postgres:PASSWORDservice-control --stop --all && service-control --start --all
service-control --status vmware-certificatemanagement