hygieia / hygieia-cloud-cloudwatch-collector

Hygieia Collector for Cloudwatch logs
https://github.com/capitalone/Hygieia/blob/gh-pages/pages/hygieia/collectors/cloud/aws-cloudwatch-collector.md
Apache License 2.0
1 stars 4 forks source link

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 3 years ago

jithinjacob24x7 commented 3 years ago

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: \.