Warren
Warren

Reputation: 755

Mongo 3.0.1 DB Auth/Connection problems. Mongo console Yes, everything else No

I have MongoDB 3.0.1 installed on Windows 7 Pro 64bit. Everything that I am doing is being done on this server itself, all connections are via 127.0.0.1:27017. And yes, I have applied the MS Hotfix that was recommended to do by MongoDB. Here is my complete config file:

systemLog:
   destination: file
   path: "C:\\Program Files\\MongoDB\\Server\\3.0\\data\\log\\mongod.log"
   logAppend: true
storage:
   dbPath: "C:\\Program Files\\MongoDB\\Server\\3.0\\data\\db"
security:
   authorization: enabled

I created a superuser like this:

db.createUser({user:"superuser", pwd:"temp",
roles:[ "userAdminAnyDatabase", "readWrite" ] } )

I can log into mongo console like this:

mongo.exe 127.0.0.1:27017/admin  -u superuser -p temp --authenticationDatabase admin --verbose

I can then do everthing from mongo console. But when I try to connect an admin UI such as Mongovue or Robomongo, I get connection refused. Mongovue spits out this stack trace:

Connection was refused
Unable to connect to server 127.0.0.1:27017: Object reference not set to an instance of an object..
Type: MongoDB.Driver.MongoConnectionException
Stack:    at MongoDB.Driver.Internal.DirectMongoServerProxy.Connect(TimeSpan timeout, ReadPreference readPreference)
   at MongoDB.Driver.MongoServer.Connect(TimeSpan timeout)
   at MongoDB.Driver.MongoServer.Connect()
   at MangoUI.MMongo.QSDlL5xzK686iCExThO(Object )
   at MangoUI.MMongo.Open(Boolean mustWrite)
   at MangoUI.MMongo.Open()
   at MangoUI.MConnection.get_IsValid()
   at MangoUI.WinConnect.SCOjR9kYRPerNNngykW(Object )
   at MangoUI.WinConnect.btnTest_Click(Object sender, EventArgs e)


Object reference not set to an instance of an object.
Type: System.NullReferenceException
Stack:    at MongoDB.Driver.MongoServerInstance.RefreshStateAsSoonAsPossible()
   at MongoDB.Driver.Internal.MongoConnection.HandleException(Exception ex)
   at MongoDB.Driver.Internal.MongoConnection.SendMessage(BsonBuffer buffer, Int32 requestId)
   at MongoDB.Driver.Internal.MongoConnection.SendMessage(MongoRequestMessage message)
   at MongoDB.Driver.Operations.CommandOperation`1.Execute(MongoConnection connection)
   at MongoDB.Driver.MongoServerInstance.RunCommandAs[TCommandResult](MongoConnection connection, String databaseName, IMongoCommand command)
   at MongoDB.Driver.MongoServerInstance.Ping(MongoConnection connection)
   at MongoDB.Driver.MongoServerInstance.Connect()
   at MongoDB.Driver.Internal.DirectMongoServerProxy.Connect(TimeSpan timeout, ReadPreference readPreference)

This looks like a null pointer to me. Am I missing a config somewhere ? What do I need to do to get this to work ?

Thanks,

Warren

Upvotes: 0

Views: 1492

Answers (1)

Warren
Warren

Reputation: 755

I guess the answer is as simple as Mongovue and Robomongo do not support Mongo DB 3.0.1 yet. I had no problems getting the Mongo console to connect and 3T MongoChef to connect. Now I guess I need to make sure Mongoose is good.

Upvotes: 4

Related Questions