Display when connecting with mongovue:
The code in the prompt box is as follows:
Connection was refused Unable to connect to server127.0.0.1: 27017: unable to connect because the target computer actively refused. 127.0.0.1:27017. 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.Open(Boolean mustWrite) at MangoUI.MMongo.Open() at MangoUI.MConnection.get_IsValid() at MangoUI.WinConnect.btnTest_Click(Object sender, EventArgs e) Unable to connect because the target computer actively refused. 127.0.0.1:27017 Type: System.Net.Sockets.SocketException Stack: at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at System.Net.Sockets.TcpClient.Connect(IPEndPoint remoteEP) 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) 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)
The first step is to determine whether your mongo service starts normally. The test method is local to the server where mongo is located
telnetTesting. Eliminate mongo Service Issues
If the first step holds, replace it with the same network segment
telnetTesting. If it cannot be accessed, check whether the port occupied by mongo is blocked by firewall or kill software. If yes, add the corresponding rules of entry and exit in the rules of entry and exit. Eliminate firewall and kill soft problems.
Finally, use your mongovue.