Skip to content
English
  • There are no suggestions because the search field is empty.

Database Ensure Failed after upgrade

Original Question or Issue:

Database Ensure index Failed after 23.251.0.30079 upgrade


Environment:

  • Product - Filecloud Server
  • Version - 23.251
  • Platform - Windows

Steps to Reproduce:

 


Error or Log Message:

Database Ensure Index Failed – E11000 duplicate key error collection: tonidosettings.keystore index: settingkey_index dup key: { key: "last_heartbeat_ts_seconds_webdrm" }


Defect or Enhancement Number:

 


Cause:

This means MongoDB attempted to create a unique index (settingkey_index) on the key field, but the collection already contains duplicate entries for last_heartbeat_ts_seconds_webdrm, which violates the uniqueness constraint required for index creation.


Resolution or Workaround:

Follow the steps below to remove the duplicate keys (Run via Command Prompt):

---
cd C:\xampp\mongodb\bin
 mongosh
 use tonidosettings

 db.keystore.deleteOne({"_id" : ObjectId("687f3792da18c629be08f452")}) //ObjectId depending from the database record
---


Notes: