Failed to connect to 127.0.0.1:27017, reason: errno:10061 由于目标计算机积极拒绝,无法连接


错误信息:

D:\Bin\mongodb-3.0.4\bin>mongo
2015-09-23T12:48:21.493+0800 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
MongoDB shell version: 3.0.4
connecting to: test
2015-09-23T12:48:22.531+0800 W NETWORK  Failed to connect to 127.0.0.1:27017, reason: errno:10061 由于目标计算机积极拒绝,无法连接。
2015-09-23T12:48:22.535+0800 E QUERY    Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
    at connect (src/mongo/shell/mongo.js:179:14)
    at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed

解决办法:
(1)删除mongod.lock文件
(2)重新启动MongDB服务:net start mongodb

你可能感兴趣的:(Failed to connect to 127.0.0.1:27017, reason: errno:10061 由于目标计算机积极拒绝,无法连接)