"Double register of key" error when starting vCenter Server 6.0
search cancel

"Double register of key" error when starting vCenter Server 6.0

book

Article ID: 335969

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • vCenter Server is using vPostgres database.
  • vCenter services fail to start with duplicate errors.
  • In the vpxd.log there are entries similar to:
error vpxd[09000] [Originator@6876 sub=Vmomi] [VpxVmomi] Double register of key: 'xxxx' and name: 'xxxx'
  • In postgres-xx.log you see: errors similar to:​
VCDB vc ERROR:  duplicate key value violates unique constraint "pk_vpx_vm”


Environment

VMware vCenter Server 6.0.x

Resolution

Note: Ensure to take a backup of vPostgress database or snapshot of the appliance. For more information, see Back up and restore vCenter Server Appliance/vCenter Server 6.0 vPostgres database.
  1. Connect to vPostgres DB. For more information, see Connecting to the embedded vPostgres Database in a Windows installed vCenter Server 6.0.
  2. Run this query to find the CTID of the duplicate.
SELECT ID,CTID from VPX_VM where ID=id;

Note: Replace id with the VM ID per the log errors.
  1. Run this query to find the duplicate entry.
SELECT CTID,ID,DNS_NAME,COUNT(ID) FROM VPX_VM GROUP BY ID,DNS_NAME HAVING COUNT(ID) > 1;

Note: Make a note of the CTID of each duplicate VM ID.
  1. Using the higher CTID for each ID, delete it from the table.
DELETE FROM VPX_VM WHERE CTID='CTID'

Note: Replace ctid with the CTID found in step 3.
  1. Restart vCenter Server Service.


Additional Information

Back up and restore vCenter Server Appliance/vCenter Server 6.0 vPostgres database
Connecting to the embedded vPostgres Database in a Windows installed vCenter Server 6.0
vCenter Server 6.0 の起動時に「キーの二重登録(Double register of key)」エラーが発生する
简体中文:启动 vCenter Server 6.0 时出现“键双重注册 (Double register of key)”错误

Impact/Risks:
Duplicate entries may indicate database corruption and removing the duplicate entry may not always fix the issue.
Always take a snapshot or backup prior to any database manipulation.