|
1) Run c:\mongo\mongodb-win32-x86_64-2008plus-2012-07-09\bin>mongod.exe --logpath c:\data\mongod.log --port 30000 to be config server
2) Run c:\mongo\mongodb-win32-x86_64-2008plus-2012-07-09\bin>mongos.exe --configdb localhost:30000 --logpath c:\data\mongos.log
3) Now connect mongo.exe to mongos. In the shell
mongos> db.runCommand("logRotate")
Mon Jul 09 22:03:40 uncaught exception: error
{
"$err" : "error creating initial database config information :: caused b
y :: can't find a shard to put new db on",
"code" : 10185
}
If I run mongos> db.adminCommand("logRotate")
{ "ok" : 1 }
Once I add a shard to the setup if I run mongos> db.runCommand("logRotate")
{ "ok" : 0, "errmsg" : "access denied - use admin db" }
This is as expected.
|