1

I'm trying to create a new connection in MongoVUE but I have an error : "Connection was refused".

The connection configuration is:

  1. Name: database
  2. Server: 127.0.0.1
  3. Port: 27017(default)
  4. Username:admin

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)

How can I fix it and create connection? Help please.

Community
  • 1
  • 1
Andrii Pryimak
  • 797
  • 2
  • 10
  • 33
  • MongoDB 3.X server perhaps? The authentication routines have been updated. Make sure your client supports these. Therefore upgrade or use something else. – Blakes Seven Jun 27 '15 at 16:52
  • I've installed server earlier and it works fine... I'll check my client. What tools can I use? – Andrii Pryimak Jun 27 '15 at 17:03

1 Answers1

2

Maybe you have solved this problem.I just provide how I solve for whom come with it later:

  1. check if your mongodb is on.
    Open the browser, input the urllocalhost:27017, you should find that the web page have words like"it seems that you attend to connect the mongodb", then go to step 3.
    If not go to step 2.
  2. keep your mongodb on.
    you should add the install directory to the path variable.
    Then create a directory to store you db,for example"D:\data\db\".
    Then input this commandmongod --dbpath D:\data\db in the console, never close the console if you want to make connection.
    Then go step 3.
  3. Use MongoBooster rather than MongVUE. MongoVUE is nolooger update since 2014. However, mongobooster is well and good,support mongodb from 2.2 to 3.2

That is all.

Leo Yip
  • 36
  • 2