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/
NOTE:
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...
mongos> 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>
|
I am using Keyfile based authenticaiton.
Attachments
Issue Links
- duplicates
-
CDRIVER-559 Issues in cluster authentication mod
-
- Closed
-