To connect to a Mongo 3.x DB you need to use Mongo 3.x client or Mongo 3.x compatible UI

I was just setting up Mongo database on a CentOS server. Tried to connect from a remote Ubuntu machine and failed. Tried to connect with older copy of MongoVue and failed. Tried everything, setting mongod.conf to all kinds of values, changing iptables, creating and recreating DBs, admin and other users. No luck. Wasted a day.

Then only thanks to this post I learned that it might be due to incompatibility of versions.
https://stackoverflow.com/questions/31091121/failed-connection-in-mongovue#comment50198839_31091121

I tried to connect from a machine that had Mongo 3.x installed and … success. I also installed Robo 3T from www.robomongo.org and it worked like a charm as well. Might save someone time.

Here are some messages that I was getting when trying to connect from old version of MongoVue:

Unable to connect to server asdfasdffake.com: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.ComNavTree.eocHiDskdDq1GPOj7uu(Object )
   at MangoUI.ComNavTree.ExpandMe(MTreeNode expand)
   at MangoUI.ComNavTree.tree_BeforeExpand(Object sender, TreeViewCancelEventArgs 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)




Connection was refused
Unable to connect to server asdfasdffake.com:27017: Invalid credential for database 'test_db'..
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)


Invalid credential for database 'test_db'.
Type: MongoDB.Driver.MongoAuthenticationException
Stack:    at MongoDB.Driver.Communication.Security.MongoCRAuthenticationProtocol.Authenticate(MongoConnection connection, MongoCredential credential)
   at MongoDB.Driver.Communication.Security.Authenticator.Authenticate(MongoCredential credential)
   at MongoDB.Driver.Communication.Security.Authenticator.Authenticate()
   at MongoDB.Driver.Internal.MongoConnection.Open()
   at MongoDB.Driver.Internal.MongoConnection.GetNetworkStream()
   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)