Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
1.6
-
None
-
None
-
Windows Azure, C# worker role, 3 Replica set databases, no shards.
Description
We get this error message about 30% of the time
Command 'shutdown' failed: unauthorized: this command must run from localhost when running db without auth (response:
{ "errmsg" : "unauthorized: this command must run from localhost when running db without auth", "ok" : 0.0 })
We do not use authentication in the database.
This is the C# code we use to connect to the database for this command. This worked for fine when we were using an earlier version of the database.
MongoServer.Create(string.Format("mongodb://localhost:
{0}/?slaveOk=true", MongoHostPortSetting.GetMongoHostPortSettings().Port));
This is the stack trace:
MongoDB.Driver.MongoCommandException: Command 'shutdown' failed: unauthorized: this command must run from localhost when running db without auth (response:
{ "errmsg" : "unauthorized: this command must run from localhost when running db without auth", "ok" : 0.0 })
at MongoDB.Driver.MongoDatabase.RunCommandAs(Type commandResultType, IMongoCommand command) in C:\work\rstam\mongo-csharp-driver\Driver\Core\MongoDatabase.cs:line 978
at MongoDB.Driver.MongoDatabase.RunCommandAs[TCommandResult](String commandName) in C:\work\rstam\mongo-csharp-driver\Driver\Core\MongoDatabase.cs:line 962
at MongoDB.Driver.MongoServer.Shutdown(MongoCredentials adminCredentials) in C:\work\rstam\mongo-csharp-driver\Driver\Core\MongoServer.cs:line 1008
at MongoWorker.WorkerRole.OnStop() in c:\Sources\iQmetrix\Service\MongoWorker\WorkerRole.cs:line 250
Because the database does not shutdown cleanly it has to do a full recovery when we bring it back up which takes quite a while.