"An error occurred while starting service 'vpxd-svcs'" var/log/vmware/vpxd-svcs/vpxd-svcs.log you may find entries similar to:YYYY-MM-DDTHH:MM:SS.234Z [main [] ERROR com.vmware.cis.core.kv.impl.Provider.VCDBProviderFactory opId=] Unable to get database connection:org.postgresql.util.PSQLException: The server requested password-based authenticatin, but no password was provided by plugin null"vpxd_svcs_kv_store" does not exist. In /var/log/vmware/vpostgres/postgresql.log, you will find entries similar to:YYYY-MM-DDTHH:MM:SS.234 UTC 652d07f4.560c 0 VCDB vpxd_svcs_kv_store [local] 22028 2 FATAL: password authentication failed for user "vpxd_svcs_kv_store"YYYY-MM-DDTHH:MM:SS.234 UTC 652d07f4.560c 0 VCDB vpxd_svcs_kv_store [local] 22028 3 DETAIL: Role "vpxd_svcs_kv_store" does not exist. Connection matched pg_hba.conf line 7: "local all all md5"
var/log/vmware/vpxd-svcs/pre-start-vpxd-svcs.log, you will find entries similar to:YYYY-MM-DDTHH:MM:SS.294Z INFO Executing vpxd-svcs pre start commands.YYYY-MM-DDTHH:MM:SS.451Z DEBUG Executing cmd : /usr/bin/python /usr/lib/vmware/site-packages/vsr/db_tool/vpg_sync_registry.py --registry /etc/vmware/service-registry/vpxd-svcs-sub-registry.yaml -U postgres --host /var/run/vpostgres --operation install --instance vpostgres --stage roles --stage grants --database VCDBYYYY-MM-DDTHH:MM:SS.698Z INFO Failure to create vpxd-svcs pg role, stdout : b'' | error : b'2023-10-16 09:52:48,685 ERROR : during Generation of the diff: Invalid identifier: "vcenterVA_RO"\n'
INFO:__main__:Executing lookupsvc prestart scriptINFO:__main__:Failure granting permissions to lookupsvc VCDB role. stdout : | error : YYYY-MM-DD HH:MM:SS,744 ERROR : during Generation of the diff: Invalid identifier: "vcenterVA_RO"
YYYY-MM-DD HH:MM:SS.055 UTC 652d07c6.47d3 0 VCDB lookupsvc_sync_db [local] 18387 2 FATAL: password authentication failed for user "lookupsvc_sync_db"YYYY-MM-DD HH:MM:SS.055 UTC 652d07c6.47d3 0 VCDB lookupsvc_sync_db [local] 18387 3 DETAIL: Role "lookupsvc_sync_db" does not exist. Connection matched pg_hba.conf line 7: "local all all md5"YYYY-MM-DD HH:MM:SS.055 UTC 652d07c6.47d3 0 VCDB lookupsvc_sync_db [local] 18387 4 LOG: could not send data to client: Broken pipe
Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.
VMware vCenter Server 8.x
This issue is caused due to a custom role in the vCenter database with an unsupported format. Supported format for database role name is [A-Za-z0-9_] alphanumeric and underscore. Any other special characters in the name will cause this issue.
Note: Creating custom roles in the vCenter database is not recommended.
Additional information:
Even though the DB role name "vcenterVA_RO" in this example looks supported, we will still have this issue because of the way the upper-case letters are handled.
If we encounter this issue during the upgrade to 8.0U2, we may not see the "Invalid identifier" error in the logs, but this article is still valid.
To resolve the issue, you have to either drop the role or rename it to a supported format.
To drop the role, follow the steps below.
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres\du
Note: Here, we should see the custom database role that was causing the issue.DROP ROLE "vcenterVA_RO1";CREATE ROLE "vcenterVA_RO1" login password 'my_password';
GRANT CONNECT ON DATABASE "VCDB" TO "vcenterVA_RO1";
GRANT USAGE ON SCHEMA vc TO "vcenterVA_RO1";
GRANT SELECT ON ALL TABLES IN SCHEMA vc TO "vcenterVA_RO1"
CREATE ROLE "vcenterVA_RO1" login password 'my_password';GRANT CONNECT ON DATABASE "VCDB" TO "vcenterVA_RO1";GRANT USAGE ON SCHEMA vc TO "vcenterVA_RO1";GRANT SELECT ON ALL TABLES IN SCHEMA vc TO "vcenterVA_RO1"Note: Adjust the database role name accordingly.
To rename the Role:
ALTER ROLE "vcenterVA_RO" TO "vcentervaro";
Note: After renaming the role, ensure to update the third-party solutions with the new name.