美文网首页
mongodb报错:A timeout occured afte

mongodb报错:A timeout occured afte

作者: 醉酒的姑娘 | 来源:发表于2020-06-01 10:37 被阅读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

    相关文章

      网友评论

          本文标题:mongodb报错:A timeout occured afte

          本文链接:https://www.haomeiwen.com/subject/mkdjzhtx.html