Search the VMware Knowledge Base (KB)
View by Article ID

vpxd service fails with error: duplicate key value violates unique constraint "vpxi_psa_path" (2151124)

  • 0 Ratings

Symptoms

  • In the 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.

Resolution

To resolve 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.

    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

    /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

  5. Truncate the VPX_PSA_PATH table

    truncate VPX_PSA_PATH

  6. Start the vCenter Service

    service-control --start vmware-vpxd

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 0 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 0 Ratings
Actions
KB: