我正在使用Mongo DB 3.4.2,从API访问数据时遇到一个奇怪的问题。错误消息显示:
"ClassName": "System.TimeoutException",
"Message": "A timeout occured after 30000ms selecting a server usingCompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : \"1\", ConnectionMode : \"Automatic\", Type : \"Standalone\", State : \"Disconnected\", Servers : [{ ServerId: \"{ ClusterId : 1, EndPoint : \"ServerIp:27017\" }\", EndPoint: \"ServerIp:27017\", State: \"Disconnected\", Type: \"Unknown\", HeartbeatException: \"MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
正如您所看到的问题所示:“由于目标计算机主动拒绝连接,因此无法建立连接”,我们已经验证了以下内容:
通过重新启动服务器上的Mongo Db服务解决了该问题,但重新启动服务后每1小时出现同样的问题。
有人可以帮我解决这个问题,
由于