[英]MongoDb connection timeout
I am using mongoDb for desktop application.我将 mongoDb 用于桌面应用程序。 it works when I uses home WIFI but when I uses my company WIFI, it get connection timeout error
当我使用家庭 WIFI 时它可以工作但是当我使用我公司的 WIFI 时,它会出现连接超时错误
I checked firewall and it seems it doesn't block it.我检查了防火墙,它似乎没有阻止它。 how can i solve this?
我该如何解决这个问题?
exception:例外:
System.TimeoutException: 'A timeout occurred after 30000ms
selecting a server using CompositeServerSelector{ Selectors =
MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector,
LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000
}, OperationsCountServerSelector }. Client view of cluster state is {
ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet",
State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1,
EndPoint : "Unspecified/xxxxxxxxxx" }", EndPoint:
"Unspecified/xxxxxxxx", ReasonChanged: "Heartbeat", State:
"Disconnected", ServerVersion: , TopologyVersion: , Type: "Unknown",
HeartbeatException: "MongoDB.Driver.MongoConnectionException: An
exception occurred while opening a connection to the server. --->
System.Net.Sockets.SocketException: A connection attempt failed
because the connected party did not properly respond after
a period of time, or established connection failed because connected
host has failed to respond 207.46.145.150:27017
I've encountered the same problem, finally I found that there is a white list you need to configure to allow the access of the mongodb.我也遇到过同样的问题,最后发现有一个白名单需要配置才能允许mongodb的访问。
See this documentation:请参阅此文档:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.