启动mongodb后,在web端口访问情况下,点击List all commands会出现如下错误
REST is not enabled. use --rest to turn on.
check that port 28017 is secured for the network too.
check that port 28017 is secured for the network too.
原因是rest未启动,现在给出windows下的解决方案
以命令行启动的在命令行键入
--rest
具体如下
切换到mongo.ext文件所在目录如D:\mongodb\bin

之后点击List all commands出现

配置文件启动
内容如下
#start MongoDB
port=27017
dbpath = "D:\mongodb\db"
logpath = "D:\mongodb\db\log\MongoDB.log"
rest = true
加上rest=true即可
本文介绍了解决MongoDB中REST功能未启用的问题。通过在命令行输入--rest或在配置文件中设置rest=true来开启REST功能,使得能够通过web端口正常使用Listallcommands等功能。
1520

被折叠的 条评论
为什么被折叠?



