I am seeing the following error in the discovery_server logs: Cannot insert duplicate key in object CM_NIMBUS_PACKAGE

book

Article ID: 6115

calendar_today

Updated On:

Products

DX Infrastructure Management NIMSOFT PROBES

Issue/Introduction

I am having below error repeating in 'discovery_server.log'


Line 185: 20 Mar 2017 02:18:15,983 [robotWorker-3] ERROR com.nimsoft.discovery.common.util.ExceptionUtil - PackagePersister exception for

/<DOMAIN>/<HUB>/<ROBOT> : 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 (2263, <PackageName>).; 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 (2263, <PackageName>).

Cause

This is related to a problem with the information being stored on a robot.

 

Environment

UIM 8.51Discovery_server 8.51Can be seen on earlier versions:

Resolution

1. delete the package entry from Nimsoft\robot\pkg\inst\installed.pkg package file
(edit with notepad)

2. delete the contents of the Nimsoft\niscache folder

3. restart the robot

4. delete the entry from cm_nimbus_package table in the UIM database

5. restart discovery_server