node.js - MongoDB 卡在 clientcursormon 上(等待端口 27017 上的连接)

标签 node.js mongodb localhost

简单地安装 MongoDB 并在 MongoDB 文件夹中创建\data\db 后,我继续运行 mongod.exe --dbpath C:\MongoDB\data\db。它运行一堆 initandlisten 代码,然后当它等待端口 27017 上的连接时,它会挂起并写出 mem res:47 virt:171mapped:80connections:0。我对 Mongo 很陌生,还没有找到关于为什么会挂起以及如何修复它的明确答案。

最佳答案

如果您想在 Windows 下将 mongod.exe 进程作为服务运行(以避免它占用命令提示符),您应该按照 MongoDB 2.6.0 的这些说明进行操作(2.6.0 在正常方法中存在一个错误)将 MongoDB 配置为服务)。

There is a known issue for MongoDB 2.6.0, SERVER-13515, which prevents the use of the instructions in this section. For MongoDB 2.6.0, use Manually Create a Windows Service for MongoDB to create a Windows Service for MongoDB instead.

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/#manually-create-windows-service

对于 MongoDB 版本 2.6.1 及更高版本,请遵循正常说明:

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/#configure-a-windows-service-for-mongodb

关于node.js - MongoDB 卡在 clientcursormon 上(等待端口 27017 上的连接),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24543595/

相关文章:

ajax - 我应该在通过 .sendFile() 响应之前检查文件是否存在吗?

javascript - 更新查询mongoDB中的增量值

mongodb - 有什么方法可以强制遵守模式吗?

python - 使用 python 和 mysql.connector 从表中获取数据

javascript - Express render() 中的函数调用未定义

javascript - 错误: unmatched close parenthesis and I'm sure there's none

node.js - 在 Docker 中使用 Yarn 从私有(private)注册表安装包

python - 如何在 python 中为 db.collection.group() 编写 mongodb 查询

mysql - DBI->connect 在终端中执行时有效,但在浏览器中执行时无效

apache - 如何使用 Apache 运行多个启用 SSL 的网站以进行本地开发