hygieia / hygieia-oss-nexusiq-collector

Hygieia Collector for OS Library Policy tool Nexus IQ
https://github.com/capitalone/Hygieia/blob/gh-pages/pages/hygieia/collectors/library-policy/nexus-iq-collector.md
Apache License 2.0
0 stars 5 forks source link

Nexus- IQ Collector "Index with name: unique_mdata_key_type already exists with different options" #9

Open kuchanamounika opened 3 years ago

kuchanamounika commented 3 years ago

Affects: \.


kuchanamounika commented 3 years ago

Hi Team,

I am running in to issue like below while running the nexus iq from master branch 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 respo nse is { "ok" : 0.0, "errmsg" : "Index with name: unique_mdata_key_type already exists with different options", "code" : 85, "codeName" : "IndexOptionsConflict" } at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:77) at com.mongodb.connection.CommandProtocol.createCommandResult(CommandProtocol.java:140) at com.mongodb.connection.CommandProtocol.receiveMessage(CommandProtocol.java:131) at com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:84) at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:155) at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:219) at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:146) at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:182) at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:173) at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:145) at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:139) at com.mongodb.operation.CreateIndexesOperation$1.call(CreateIndexesOperation.java:116) at com.mongodb.operation.CreateIndexesOperation$1.call(CreateIndexesOperation.java:111) at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:186) at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:177) at com.mongodb.operation.CreateIndexesOperation.execute(CreateIndexesOperation.java:111) at com.mongodb.operation.CreateIndexesOperation.execute(CreateIndexesOperation.java:66) at com.mongodb.Mongo.execute(Mongo.java:747) at com.mongodb.Mongo$2.execute(Mongo.java:730) at com.mongodb.DBCollection.createIndex(DBCollection.java:1492) at org.springframework.data.mongodb.core.index.MongoPersistentEntityIndexCreator.createIndex(MongoPersistentEntityIndexCreator.java:142) ... 41 more here is my application.properties file

Database Name

dbname=dashboarddb

Database HostName - default is localhost

dbhost=localhost

Database Port - default is 27017

dbport=27017

MongoDB replicaset

dbreplicaset=false

dbhostport=[host1:port1,host2:port2,host3:port3]

Database Username - default is blank

dbusername=dashboarduser

Database Password - default is blank

dbpassword=dbpassword

Collector schedule (required)

nexusiq.cron=0 0/5

Nexus IQ server(s) (required) - Can provide multiple

nexusiq.servers[0]=nexus-url

Nexus IQ username/password - with read-access to all reports, and so on.

nexusiq.username=mypwd nexusiq.password=mypwd

In case of multiple license violations for a given library, consider the strictest violation

nexusiq.selectStricterLicense=true

can some one help on resolving this issue