无法将MongoDB作为服务启动 [英] Cannot start MongoDB as a service

查看:81
本文介绍了无法将MongoDB作为服务启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为MongoDB开发了几个月了,并且希望将其作为服务安装在Windows 7 Enterprise计算机上.以下是我为创建服务而执行的命令:

I have been developing for MongoDB for some months now and would like to install it as a service on my Windows 7 Enterprise machine. The following is the command that I have executed to create the service:

"D:\Milvia Systems\Development\MongoDB\mongod.exe" --logpath "D:\Milvia Systems\Development\MongoDB\logs\DBLog.log" --logappend --dbpath "D:\Milvia Systems\Development\MongoDB\db" -vvv --reinstall

但是,每当我使用net start"MongoDB"或服务控制面板时,都会出现以下错误:

However, whenever I use net start "MongoDB" or the Service Control Panel I receive the following error:

错误1053:服务未响应启动或控制 及时提出要求.

Error 1053: The service did not respond to the start or control request in a timely fashion.

环境:Windows 7 Enterprise 64位 MongoDB:1.6.3 pdfile版本4.5

Environment: Windows 7 Enterprise 64bit MongoDB: 1.6.3 pdfile version 4.5

推荐答案

是否已检查日志以查看真正的问题?

Have your checked you logging to see the real problem?

我建议将Mongo安装解压缩到c:\mongodb.

I suggest extracting the Mongo installation to c:\mongodb.

创建c:\mongodb\logsc:\mongodb\data\db目录.

然后浏览c:\mongodb\bin目录并运行以下命令以删除该服务(如果已安装!):

Then browse the the c:\mongodb\bin directory and run the following to remove the service (if you've installed it!):

mongod --remove

然后安装服务,指定日志和数据目录:

Then install the service, specifying the log and data directories:

mongod --logpath c:\mongodb\logs\mongo.log --dbpath c:\mongodb\data\db --directoryperdb --install

然后,如果启动服务时遇到问题,则应在指定的日志文件中查看原因.

Then if there is a problem starting the service you should see the reason in the specified log file.

更多信息此处.

这篇关于无法将MongoDB作为服务启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆