2024-08-26T16:13:07.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 ...
2024-08-26T16:13:07.276Z info vpxd[3098749] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Logging in to DSN: VMware VirtualCenter with username vpxd
2024-08-26T16:13:07.280Z error vpxd[3098749] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Aborting after 413058 retries.
2024-08-26 16:13:07.263 UTC 66cca993.b81c 0 [unknown] [unknown] [local] 47132 1LOG: connection received: host=[local]
2024-08-26 16:13:07.264 UTC 66cca993.b81c 0 VCDB vpxd [local] 47132 2LOG: connection authenticated: identity="root" method=peer (/storage/db/vpostgres/pg_hba.conf:
24)
2024-08-26 16:13:07.264 UTC 66cca993.b81c 0 VCDB vpxd [local] 47132 3LOG: no match in usermap "vcdb" for user "vpxd" authenticated as "root"
2024-08-26 16:13:07.264 UTC 66cca993.b81c 0 VCDB vpxd [local] 47132 4FATAL: Peer authentication failed for user "vpxd"
2024-08-26 16:13:07.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.0
The VPXD process is failing to connect as a database user vpxd as the VPXD process is running as the user root rather than the OS user vpxd.
With vCenter server 8.0, it no longer uses the database vc to connect to VPXD, but via peer mapping the OS user vpxd to connect to VPXD.
At this time, there is no resolution.
Workaround
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
vi /etc/vmware/vmware-vmon/svcCfgfiles/vpxd.json
vpxd
to root
/storage/db/vpostgres/pg_ident.conf
# gss
vcdb root vpxd
service-control --stop --all;service-control --start --all