Exchange Online and Internal Mail Routing error: “An item with the same key has already been added”

CLOUD ON-PREMISES


Applies to Gizmo 2.2

This article explains how to fix the following error, which may occur when Gizmo is monitoring Exchange Online and Internal Mail Routing workloads: "An item with the same key has already been added.” This error occurs if you have modified the initial configuration and mistakenly created duplicate settings. When duplicate settings exist, the Gizmo WebUI displays the following critical issue:

For example, if you have mistakenly added “disable auto discover” twice in the Exchange Online configuration, the WebUI displays a critical issue and the log contains the same error:


To resolve the error, perform the following steps on the machine that hosts the Robot Manager.

Instructions

  1. Open the GSX management shell.
  2. Enter the following command to get the GUID of the workload configuration where the error occurs:  Get-gsxscanconfiguration | ft

  3. Enter the parameters command and then find the duplicate key in parameters list:

  4. Remove the duplicate key using the command $r.paramters.remove(“disableAutodiscover”). Alternatively, you can delete the existing configuration and create new scan configuration.

  5. Re-add the scan configuration on the machine that hosts the Robot Manager.

Gizmo continues to monitor the workloads and the error no longer displays.