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