Discovery queue is not draining - error in discovery logs mentions duplicate key in CM_NIMBUS_PACKAGE
search cancel

Discovery queue is not draining - error in discovery logs mentions duplicate key in CM_NIMBUS_PACKAGE

book

Article ID: 6728

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

In the discovery_server log we see something similar to the following


15 Dec 2015 15:20:33,965 [robotWorker-1] ERROR com.nimsoft.discovery.common.util.ExceptionUtil - PackagePersister exception for /PrimaryHub/nimSecondaryHub/robot01 : org.springframework.dao.DuplicateKeyException: PreparedStatementCallback; SQL []; Violation of PRIMARY KEY constraint 'PK_CM_NIMBUS_PACKAGE'. Cannot insert duplicate key in object 'dbo.CM_NIMBUS_PACKAGE'. The duplicate key value is (1182, cdm-pagefile).; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK_CM_NIMBUS_PACKAGE'. Cannot insert duplicate key in object 'dbo.CM_NIMBUS_PACKAGE'. The duplicate key value is (1182, ccdm_pagefile).

Environment

Unified Infrastructure Manager 8.2

Cause

This is due to multiple packages with the same name being installed on the same robot. It causes an issue in the 8.2 discovery server that causes discovery_server to hang due to a unique key constraint.

Resolution

  1. Stop discovery_server
  2. In Infrastructure Manager, navigate to the robot that is listed in the error message
    • For example, /PrimaryHub/nimSecondaryHub/robot01in the error message above.
  3. Select the 'controller' probe on this hub itself and press CTRL+P for probe utility
  4. Run the probe callback "inst_list_summary"
  5. You should see the package that is causing issues
    • In this example cdm-pagefile
  6. In the probe utility run inst_list_remove and insert the name of the package.
    • In this example cdm-pagefile
  7. Clear the niscache on the same hub/robot
  8. Reactivate the discovery_server
    • You may need to clear out the discovery_server queue to help it catch up.
  9. Retest - issue should resolved