This error can be resolved by removing a row from the database. (make sure to back up database before doing any delete statements)
In SQL Server Manager open a new query under the LDMS Database instance
Select * from CoreConfiguration
Note: Depending on configuration this table might return multiple rows. Find the row with the configuration name AgentDiscovery this is the row we need to remove.
In this example the delete statement would be:
delete from coreconfiguration where coreconfiguration_idn = 2