mongodb报错:A timeout occured afte

2020-06-01  本文已影响0人  醉酒的姑娘

System.TimeoutException:“A timeout occured after 30000ms selecting a server using CompositeServerSelector{ 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 : "127.0.0.1:27017" }", EndPoint: "127.0.0.1:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: 由于目标计算机积极拒绝,无法连接。 127.0.0.1:27017

解决方案:
打开命令提示符,mongodb/server/4.0/bin下找到mongod.exe,拖动到命令提示符中,执行!,如下图表示成功

image.png image.png image.png image.png
或在浏览器中打开 http://localhost:27017,出现如下信息表示成功! image.png
上一篇 下一篇

猜你喜欢

热点阅读