Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Caused by: com.mongodb.MongoCommandException: Command failed with error 85: 'Index with name: unique_mdata_key_type already exists with different options' on server localhost:27017 #12

Open
jithinjacob24x7 opened this issue Apr 13, 2021 · 0 comments

Comments

@jithinjacob24x7
Copy link

Hello,
I have been trying to run cloudwatch collector, when i try running the collector jar it gives me the following:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'metadataRepository': Invocation of init method failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Cannot create index for '' in collection 'metadata' with keys '{ "key" : 1 , "type" : 1}' and options '{ "name" : "unique_mdata_key_type" , "unique" : true}'. Index already defined as '{ "v" : 2 , "key" : { "key" : 1 , "type" : 1} , "name" : "unique_mdata_key_type"}'.; nested exception is com.mongodb.MongoCommandException: Command failed with error 85: 'Index with name: unique_mdata_key_type already exists with different options' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "Index with name: unique_mdata_key_type already exists with different options", "code" : 85, "codeName" : "IndexOptionsConflict" }

Caused by: com.mongodb.MongoCommandException: Command failed with error 85: 'Index with name: unique_mdata_key_type already exists with different options' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "Index with name: unique_mdata_key_type already exists with different options", "code" : 85, "codeName" : "IndexOptionsConflict" }

Can you please suggest me a workaround for this? Also I have updated the API code to the new release.

Affects: <aws-collector-version-number>.


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant