只为成功找方法,不为失败找理由。

博客园 首页 新随笔 联系 订阅 管理

查看elm 后台node 代码 一直连不上mongodb,报错

MongoDB shell version v3.6.0
connecting to: mongodb://127.0.0.1:27017
2017-12-27T09:54:34.775+0800 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2017-12-27T09:54:34.778+0800 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
解决办法

brew services start mongodb

然后连接成功 

posted on 2019-02-17 22:35  诗意的活着  阅读(872)  评论(0编辑  收藏  举报