vpxd service fails with the error: duplicate key value violates unique constraint "vpxi_psa_path"
search cancel

vpxd service fails with the error: duplicate key value violates unique constraint "vpxi_psa_path"

book

Article ID: 341137

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • In vCenter Server Appliance, vCenter Service fails with the error similar to:

error vpxd[7F0A2BF7E700] [Originator@6876 sub=Default opID=HB-host-138705@1388461-4a534d61">opID=HB-host-138705@1388461-4a534d61 ] [VdbStatement] SQLError was thrown: "ODBC error: (23505) - ERROR: duplicate key value violates unique constraint "vpxi_psa_path"

--> Key (host_id, key_val)=(138705, key-vim.host.PlugStoreTopology.Path-vmhba39:C0:T8:L0) already exists.;

--> Error while executing the query" is returned when executing SQL statement "INSERT INTO VPX_PSA_PATH (HOST_ID, PATH_ID, KEY_VAL, LUN_NUMBER, SCSI_LUN_ID, HBA_ID, TAR

GET_ID, LUN_LINK_KEY, ADAPTER_LINK_KEY, TARGET_LINK_KEY) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"

  • When the vCenter Service crashes, it reports a different host_id and the key value:

Key (host_id, key_val)=(138705, key-vim.host.PlugStoreTopology.Path-vmhba39:C0:T8:L0) already exists.;

Key (host_id, key_val)=(147971, key-vim.host.PlugStoreTopology.Path-vmhba44:C5:T3:L0) already exists.;

  • Table VPX_PSA_PATH is constant:
--> Error while executing the query" is returned when executing SQL statement "INSERT INTO VPX_PSA_PATH (HOST_ID, PATH_ID, KEY_VAL, LUN_NUMBER, SCSI_LUN_ID, HBA_ID, TAR
GET_ID, LUN_LINK_KEY, ADAPTER_LINK_KEY, TARGET_LINK_KEY) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
 
Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware vCenter Server Appliance 6.5.x
VMware vCenter Server Appliance 6.0.x

Resolution

This issue is resolved in vCenter Server 6.5 U2, available for download at VMware Download. For more information, see the vCenter Server 6.5 Update 2 Release Notes.



    Workaround:

    To workaround this issue, truncate the VPX_PSA_PATH table.

    To truncate the VPX_PSA_PATH table:

    1. Log in to the vCenter Server Appliance as root.
    2. Stop the vpxd service by running this command:

      service-control --stop vmware-vpxd
       
    3. Take a backup of the vCenter Server Database. For more information, See Back up and restore vCenter Server Appliance/vCenter Server 6.0 vPostgres database.
       
    4. Login to the vPostgres Database by running this command:

      /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
       
    5. Truncate the VPX_PSA_PATH table by running this command:

      truncate VPX_PSA_PATH
       
    6. Start the vCenter Service by running this command:

      service-control --start vmware-vpxd


    Additional Information

    中文简体:vpxd 服务失败,并显示错误:重复键值违反了唯一性约束“vpxi_psa_path”(duplicate key value violates unique constraint "vpxi_psa_path")