ISSUE: Mailbox Archive Migration error 'Cannot insert duplicate key in unique index'

Last modified:


Overview

When reviewing the Archive Progress page, there may be mailboxes that are sitting in a Processing state with no errors and no progression; I.e. the statistics are not moving nor the percentage complete

Upon reviewing the Exchange backend logs, the following error is found:

2023-03-20T17:30:22|INFO |192.168.21.254|T:1049|CommandRetriever | ||43 |9d8dc225-a6d0-409d-a51b-b097c67222dc| ||Command received. Mapping: [43] | Id: [9d8dc225-a6d0-409d-a51b-b097c67222dc | Command: [IngestExcOnlineMailbox] | CreateTimestamp: [3/12/2023 2:51:17 PM]
2023-03-20T17:30:22|ERROR|192.168.21.254|T:1049|CommandQueue |JNL_JournalArchive_27@mydomain.com ||43 |9d8dc225-a6d0-409d-a51b-b097c67222dc| ||Could not save to local database
EXCEPTION: LiteDB.LiteException: Cannot insert duplicate key in unique index '_id'. The duplicate value is '{"$guid":"9d8dc225-a6d0-409d-a51b-b097c67222dc"}'.


The root cause is undetermined as it seems to be a transient error.  

Solution

In this scenario, the resolution is the following:

1. Log onto the Bridgehead server

2. Stop all 3 services below:

Remad.ActiveDirectory

Remad.Exchange

Remad.OnPrem.Bridgehead

Note: The Exchange service could take a while to stop (upwards of 10 mins or so).  This can be monitored in the Exchange logs as well. 

3. Once all 3 are stopped, start them in this sequence:

Remad.OnPrem.Bridgehead

Remad.ActiveDirectory

Remad.Exchange

4. Monitor the Exchange logs to confirm the mailboxes are now processing as normal.  If not, there may be a need to select any of the options below depending on where the migration process is. Use the statistics in the screenshot below to determine this:

Image 170

'Retry Failed Extraction'

'Retry Failed Ingestion'

'Retry Extraction'

'Retry Ingestion'


Is this article helpful for you?