vmware-vpxd service fails to start or is forcibly shut down after multiple retries."503 Service Unavailable" or "No healthy upstream" error./var/log/vmware/vpxd/vpxd.log, contains the following entries:YYYY-MM-DDTHH:MM:SS.265Z error vpxd[3098749] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Failed to connect to database: ODBC error: (08001) - [unixODBC]connection to server on socket "/var/run/vpostgres/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "vpxd"--> . Retry attempt: 413057 ...YYYY-MM-DDTHH:MM:SS.276Z info vpxd[3098749] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Logging in to DSN: VMware VirtualCenter with username vpxdYYYY-MM-DDTHH:MM:SS.280Z error vpxd[3098749] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Aborting after 413058 retries./var/log/vmware/vpostgres/postgresql.log, contains the following entries:YYYY-MM-DDTHH:MM:SS.263 UTC 66cca993.b81c 0 [unknown] [unknown] [local] 47132 1LOG: connection received: host=[local]YYYY-MM-DDTHH:MM:SS.264 UTC 66cca993.b81c 0 VCDB vpxd [local] 47132 2LOG: connection authenticated: identity="root" method=peer (/storage/db/vpostgres/pg_hba.conf:24)YYYY-MM-DDTHH:MM:SS.264 UTC 66cca993.b81c 0 VCDB vpxd [local] 47132 3LOG: no match in usermap "vcdb" for user "vpxd" authenticated as "root"YYYY-MM-DDTHH:MM:SS.264 UTC 66cca993.b81c 0 VCDB vpxd [local] 47132 4FATAL: Peer authentication failed for user "vpxd"YYYY-MM-DDTHH:MM:SS.264 UTC 66cca993.b81c 0 VCDB vpxd [local] 47132 5DETAIL: Connection matched pg_hba.conf line 24: "local VCDB vpxd peer map=vcdb"VMware vCenter Server 8.x
In vCenter Server 8.0, the vpxd process no longer uses standard database user credentials for its connection. Instead, it utilizes peer mapping, where the database authenticates the connection based on the Operating System (OS) user. This error occurs because the vpxd process is running as the OS user root rather than the expected OS user vpxd, causing the PostgreSQL database to reject the connection.
There is no resolution at the moment. Follow these workaround steps to allow the root user to authenticate as the vpxd database user:
mkdir /backup
cp /etc/vmware/vmware-vmon/svcCfgfiles/vpxd.json /backup/vpxd.json_backup
cp /storage/db/vpostgres/pg_ident.conf /backup/pg_ident.conf_backup
Edit the vpxd.json file:
vi /etc/vmware/vmware-vmon/svcCfgfiles/vpxd.json
Locate the line "RunAsUser": "vpxd" and change it to "RunAsUser": "root". Save and exit.
Edit the pg_ident.conf file:
vi /storage/db/vpostgres/pg_ident.conf
Append the following line at the bottom:
vcdb root vpxd
Note: Use the Tab key twice to create the spacing between columns.
Update the database with this new configuration:
psql -U postgres -d VCDB -c "SELECT pg_reload_conf();"
Restart vCenter Server services:
service-control --stop --all && service-control --start --all