I am able to connect to mongoDB using a mongo client from the command line and am able to read data from Northwind DB, but when I run a query from Hunk using mongoDB virtual index, I get no result. I am using the same user/password authentication from Hunk and mongo.
search log Error "MongoException: not authorized for query on Northwind.products"
I gave the read/write permissions to user "north user" and DB: Northwind.
Am I missing some authentication setting either on the mongdb side or Hunk side?
Hunk ver: 6.2
my indexes.conf:
[provider:local-mongodb]
vix.mongodb.host = ma1.site.com:27017
vix.output.buckets.max.network.bandwidth = 0
vix.description = Test MongoDB with Hunk
vix.mongodb.auth.mechanism = CR
vix.mongodb.auth.password = north123$
vix.mongodb.auth.username = northuser
[northwind_products]
vix.description = with Auth enabled
vix.input.1.path = /tmp
vix.mongodb.collection = products
vix.mongodb.db = Northwind
vix.mongodb.field.time = _id
vix.mongodb.field.time.format = ObjectId
vix.provider = local-mongodb
disabled = 0
search log:
{"type":"literal","value":"splunk_server","raw":"\"splunk_server\""}]}]}}}
07-22-2015 00:06:32.131 INFO ERP.local-mongodb - MongoDBERP - Initiated connection to mongodb at ma1.site.com:27017
07-22-2015 00:06:32.132 INFO ERP.local-mongodb - MongoDBERP - About to execute query null using keys=null on ns Northwind/products
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - MongoDBERP - Exception while executing search process.
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - com.mongodb.MongoException: not authorized for query on Northwind.products
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - at com.mongodb.QueryResultIterator.throwOnQueryFailure(QueryResultIterator.java:214)
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - at com.mongodb.QueryResultIterator.init(QueryResultIterator.java:198)
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - at com.mongodb.QueryResultIterator.initFromQueryResponse(QueryResultIterator.java:176)
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - at com.mongodb.QueryResultIterator.<init>(QueryResultIterator.java:64)
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:86)
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:66)
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - at com.mongodb.DBCursor._check(DBCursor.java:458)
07-22-2015 00:06:32.152 ERROR ERP.local-mongodb - at com.mongodb.DBCursor._hasNext(DBCursor.java:546)
... View more