MongoDB数据库服务无法启动的解决办法(同样适用于mongodb vue的卡死)
使用mongodb时,发现竟然一直连不上服务器。使用mongodb VUE连接数据库时,报错如下:参考csdn的:http://blog.csdn.net/yuebinghaoyuan/article/details/12068975
view plain copyprint?
[*]Unable to connect to server 127.0.0.1:27017: 由于目标机器积极拒绝,无法连接。 127.0.0.1:27017.
[*]Type: MongoDB.Driver.MongoConnectionException
[*]Stack: at MongoDB.Driver.Internal.DirectConnector.Connect(TimeSpan timeout)
[*] at MongoDB.Driver.MongoServer.Connect(TimeSpan timeout, ConnectWaitFor waitFor)
[*] at MongoDB.Driver.MongoServer.Connect(TimeSpan timeout)
[*] at MongoDB.Driver.MongoServer.Connect()
[*] at MangoUI.MMongo.FQlxNlJKqO74gYmXgZR4(Object )
[*] at MangoUI.MMongo.Open(Boolean useSamus)
[*] at MangoUI.MMongo.Open()
[*] at MangoUI.ComNavTree.wJQdUqApCpjoC39P59n(Object )
[*] at MangoUI.ComNavTree.ExpandMe(MTreeNode expand)
[*] at MangoUI.ComNavTree.tree_BeforeExpand(Object sender, TreeViewCancelEventArgs e)
首先:查询是否已经开启服务,在任务管理器中mongodb服务开启,因为当初设置,是随着window服务启动而启动。启动了,但是依然不行。
本想重新启动服务,结果却如下:
现象说明:服务有问题。
再次访问服务器地址:http://127.0.0.1:28017/,若无法访问,说明服务实际上没有真正的启动。
根据错误日志可以判断出现此问题的原因:
一般原因是mongodb非法停止。
解决此问题方案:
在mongodb安装目录下有个.lock文件,删除此文件即可。
发现mongodb正常启动:
页:
[1]