为了账号安全,请及时绑定邮箱和手机立即绑定

mongodb运行报错

/ 猿问

mongodb运行报错

Vol_蒲公英 2017-10-18 11:46:46

D:\test\node-elm-master\node_modules\mongodb\lib\mongo_client.js:421

          throw err

          ^

MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]

    at Pool.<anonymous> (D:\学习重地\网上下载的项目\node-elm-master\node_modules\mongodb\node_modules\mongodb-core\lib\topologies\server.js:336:35)

    at emitOne (events.js:96:13)

    at Pool.emit (events.js:188:7)

    at Connection.<anonymous> (D:\学习重地\网上下载的项目\node-elm-master\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:280:12)

    at Connection.g (events.js:292:16)

    at emitTwo (events.js:106:13)

    at Connection.emit (events.js:191:7)

    at Socket.<anonymous> (D:\学习重地\网上下载的项目\node-elm-master\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:187:49)

    at Socket.g (events.js:292:16)

    at emitOne (events.js:96:13)

    at Socket.emit (events.js:188:7)

    at emitErrorNT (net.js:1277:8)

    at _combinedTickCallback (internal/process/next_tick.js:80:11)

    at process._tickCallback (internal/process/next_tick.js:104:9)

Program node --harmony index.js exited with code 1


Starting child process with 'node --harmony index.js'


查看完整描述

1 回答

?
大咪

你这是用虚拟机自己搭建的mongo吗?如果是的话看看linux的墙有没有关闭

查看完整回答
反对 回复 2017-10-18
点击展开后面1

添加回答

回复

举报

0/150
提交
取消
意见反馈 邀请有奖 帮助中心 APP下载
官方微信