Is there anyone who tried to connect drill to mongodb with --auth.
When I started my mongo with auth.
drill can't do any query.
My mongodb version is 2.6.9
here is the mongodb admin user information
db.createUser({
user:"test",
pwd :"test",
roles:[{
role : "readAnyDatabase" , db:"admin"
}]
})
I just want the user can query data that just need "read" permission.
here is the drill storage config
{
"type": "mongo",
"connection":"mongodb://test:[email protected]:27017/",
"enabled": true
}
Then it just keep return this error
CommandFailureException: { "serverUsed" : "192.168.170.136:27017" , "ok" :
0.0 , "errmsg" : "not authorized on admin to execute command {
listDatabases: 1 }"
don't know where is the problem. I tried mongo shell and robomongo , they
all can login with this account and query the data.
I find a similar problem with this
https://issues.apache.org/jira/browse/DRILL-1502?jql=text%20~%20%22mongo%20auth%22
Is the mongo user permission went wrong ?