[SERVER-6370] Log rotate on mongos causes uncaught exception Created: 10/Jul/12  Updated: 06/Dec/22  Resolved: 21/Mar/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.2.0-rc0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Sridhar Nanjundeswaran Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongo/mongos 2.1.3-pre build from 7/9. Windows 2008+ build running on Windows 7 with


Issue Links:
Related
Assigned Teams:
Sharding
Operating System: ALL
Participants:

 Description   

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.


Generated at Thu Feb 08 03:11:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.