yapi mongodb一直连不上

dbf7pr2w  于 2022-11-05  发布在  Go
关注(0)|答案(4)|浏览(540)

版本号

~
最新版本

什么问题

~
mongodb一直连不上
"db": {
"servername": "127.0.0.1",
"DATABASE": "yapi",
"port": 27017,
"user": "biuboompa",
"pass": "jjx666666",
"authSource": ""
},
error: MongoNetworkError: Authentication failed., mongodb Authentication failed
log: mongodb load success...
(node:1420) UnhandledPromiseRejectionWarning: Error: Cannot read property 'collection' of undefined
at /home/yapi/vendors/server/install.js:151:13

如何复现此问题

~

什么浏览器

~

什么系统(Linux, Windows, macOS)

b5buobof

b5buobof1#

[ 6/1/2020, 3:18:46 AM ] [ log ] -------------------------------------swaggerSyncUtils constructor-----------------------------------------------
[ 6/1/2020, 3:18:48 AM ] [ log ] 服务已启动,请打开下面链接访问:
http://127.0.0.1/
[ 6/1/2020, 3:18:48 AM ] [ error ] MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017, mongodb Authentication failed
[ 6/1/2020, 3:18:48 AM ] [ log ] mongodb load success...
[ 6/1/2020, 3:30:03 AM ] [ log ] -------------------------------------swaggerSyncUtils constructor-----------------------------------------------
[ 6/1/2020, 3:30:03 AM ] [ log ] 服务已启动,请打开下面链接访问:
http://127.0.0.1/
[ 6/1/2020, 3:30:03 AM ] [ error ] MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017, mongodb Authentication failed
[ 6/1/2020, 3:30:03 AM ] [ log ] mongodb load success...

我把YAPI更新到最新版本,也报同样的错误。

lvjbypge

lvjbypge2#

同问!和楼上一样错误

dfty9e19

dfty9e193#

同问!和楼上一样错误

最后原因是mongoDb服务被停用了。启动一下MongoDb服务就好了(以服务运行或后台运行)

1u4esq0p

1u4esq0p4#

mongodb Authentication failed问题,发现这个方法是可以的。
转载自: https://blog.csdn.net/qq_20794095/article/details/102971774

相关问题