ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.24k stars 622 forks source link

MongoDB index error while upgrading to 2.11.0 #6629

Closed mekya closed 2 weeks ago

mekya commented 3 weeks ago

Short description

After Upgrade to 2.11.0, Command failed with error 85 (IndexOptionsConflict)

Environment

Steps to reproduce

  1. Have a MongoDB 4.4* and install an older version than 2.10
  2. Install AMS 2.11.0 using the same mongodb server

Expected behavior

It should run properly.

Actual behavior

It throws the following exception

com.mongodb.MongoCommandException: Command failed with error 85 (IndexOptionsConflict): 'Index: { v: 2, unique: true, key: { appName: 1 }, name: "appName_unique_index" } already exists with different options: { v: 2, key: { appName: 1 }, name: "appName_1" }' on server 83.229.8.13:27017. The full response is {"ok": 0.0, "errmsg": "Index: { v: 2, unique: true, key: { appName: 1 }, name: \"appName_unique_index\" } already exists with different options: { v: 2, key: { appName: 1 }, name: \"appName_1\" }", "code": 85, "codeName": "IndexOptionsConflict"}

mekya commented 3 weeks ago

The PR on the Enterprise side

https://gitlab.com/Ant-Media/Ant-Media-Enterprise/-/merge_requests/728