[CDRIVER-559] Issues in cluster authentication mod Created: 06/Mar/15  Updated: 03/May/17  Resolved: 06/Mar/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Raja Vobugari Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-17494 Issue with mongodb authentication mode. Closed

 Description   

Hi:

I tried to setup my mongoDB cluster in authentication mode. Was able to create a admin user with role "userAdminAnyDatabase" in "admin" db in not authentication mode. Once I turn on the authentication mode, any operation I perform, I get the following error for any action as the "admin" user.

{"error":"error creating initial database config information :: caused by :: can't find a shard to put new db on"}

.

Here is the complete procedure that we followed. Version of mongodb being used is 2.6.4.

http://docs.mongodb.org/manual/tutorial/deploy-replica-set-with-auth/



 Comments   
Comment by Raja Vobugari [ 06/Mar/15 ]

Ok..go ahead and close this please. I have created another ticket on the SERVER project...

Comment by A. Jesse Jiryu Davis [ 06/Mar/15 ]

Hi Raja, it looks like you intended to file this in the SERVER project, not the CDRIVER project. I'll ask to have this issue moved to the appropriate project.

Comment by Raja Vobugari [ 06/Mar/15 ]

I am using Keyfile based authenticaiton.

Comment by Raja Vobugari [ 06/Mar/15 ]

I had create two accounts one account namely "admin" with a role of "useAdminAnyDatabase" another account namely "superuser" with a role of "root". Both of them on admin database. I am able to create additional users using "admin" account, but not able to create a database or collections using either of them. This is the error I get...

ongos> use admin
switched to db admin
mongos> db.auth("superuser", "123456")
1
mongos> use xyz
switched to db xyz
mongos> db.createcollection("hello")
2015-03-06T08:39:08.778-0500 TypeError: Property 'createcollection' of object xyz is not a function
mongos> db.createCollection("hello")
2015-03-06T08:39:39.540-0500 error: {
"$err" : "error creating initial database config information :: caused by :: can't find a shard to put new db on",
"code" : 10185
} at src/mongo/shell/query.js:131

I look at the shard status...I see the following...

mongos> sh.status()
— Sharding Status —
sharding version: {
"_id" : 1,
"version" : 4,
"minCompatibleVersion" : 4,
"currentVersion" : 5,
"clusterId" : ObjectId("54f92c3fd77ac96ad05d5924")
}
shards:
databases:

{ "_id" : "admin", "partitioned" : false, "primary" : "config" }

mongos>

Generated at Wed Feb 07 21:09:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.