启动运行 Mongo DB 1.6.3 的 Windows XP 服务时出现错误 1053

发布于 2024-09-25 03:38:26 字数 1344 浏览 3 评论 0原文

我正在尝试在我的 Windows XP SP 3 计算机上设置 MongoDB 1.6.3。

我已按照 MongoDB wiki 中的说明进行操作。我可以看到 Windows 服务已安装但未启动。

可执行文件的路径如下所示:

"C:\Tools\mongodb-win32-i386-1.6.3\bin\mongod" --bind_ip  127.0.0.1  --logpath  c:/mongodb/logs/mongodb.log  --logappend  --dbpath  "c:/mongodb/data"  --directoryperdb  MongoDB  --service  

当我尝试启动服务时,我收到一个错误弹出窗口,其中包含以下消息:

错误1053:服务没有 响应启动或控制 及时请求。

dbpathlogpath 更改为 c:/data/dbc:/data/logs/mongodb.log > 分别,但结果是一样的。

我已经检查过以确保所有目录和文件确实存在 - 不用担心。

我刚刚在美国东部时间下午 1:18 再次尝试,得到了同样的错误,并在日志文件中看到了这个:

Sun Sep 26 13:18:15 dbexit: 

Sun Sep 26 13:18:15 shutdown: going to close listening sockets...
Sun Sep 26 13:18:15 shutdown: going to flush oplog...
Sun Sep 26 13:18:15 shutdown: going to close sockets...
Sun Sep 26 13:18:15 shutdown: waiting for fs preallocator...
Sun Sep 26 13:18:15 shutdown: closing all files...
Sun Sep 26 13:18:15     closeAllFiles() finished

Sun Sep 26 13:18:15 dbexit: really exiting now

所以我相信日志文件设置正确并且工作正常,但我得到的信息没有帮助。

另一个有用的一点是:如果我打开命令 shell 并在命令行上启动它,我就可以毫无问题地运行 MongoDB。

任何有关我出错的地方或更正的建议将不胜感激。

I'm trying to set up MongoDB 1.6.3 on my Windows XP SP 3 machine.

I've followed the instructions from the MongoDB wiki. I can see the Windows service installed but not started.

The path to the executable looks like this:

"C:\Tools\mongodb-win32-i386-1.6.3\bin\mongod" --bind_ip  127.0.0.1  --logpath  c:/mongodb/logs/mongodb.log  --logappend  --dbpath  "c:/mongodb/data"  --directoryperdb  MongoDB  --service  

When I try to start the service I get an error popup with the following message:

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

Changed the dbpath and logpath to c:/data/db and c:/data/logs/mongodb.log respectively, but the result was the same.

I've checked to make sure that all directories and files do indeed exist - no worries there.

I just tried it again @ 1:18 PM EDT, got the same error, and saw this in the log file:

Sun Sep 26 13:18:15 dbexit: 

Sun Sep 26 13:18:15 shutdown: going to close listening sockets...
Sun Sep 26 13:18:15 shutdown: going to flush oplog...
Sun Sep 26 13:18:15 shutdown: going to close sockets...
Sun Sep 26 13:18:15 shutdown: waiting for fs preallocator...
Sun Sep 26 13:18:15 shutdown: closing all files...
Sun Sep 26 13:18:15     closeAllFiles() finished

Sun Sep 26 13:18:15 dbexit: really exiting now

So I believe the log file is set up properly and working correctly, but the info I get isn't helpful.

One more useful bit: I can run MongoDB without any issues if I open a command shell and start it up on the command line.

Any advice on where I went wrong or corrections would be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

翻身的咸鱼 2024-10-02 03:38:26

如果logpathdbpath中的目录之一不存在,它将无法启动。因此,请确保路径指向现有目录。

如果路径确实存在,请检查日志文件以获取有关错误原因的更多信息。

为了响应您的更新,

我已经能够重现该问题,并在尝试使用 Visual Studio 进行调试时注意到错误代码 0xc0000417。这是一个 STATUS_INVALID_CRUNTIME_PARAMETER 错误,这意味着向 C 运行时函数传递了无效参数。

正如您发布的,可执行文件的路径是:

C:\Tools\mongodb-win32-i386-1.6.3\bin\mongod" --bind_ip 127.0.0.1 --logpath c:/mongodb/logs/mongodb .log --logappend --dbpath "c:/mongodb/data" --directoryperdbMongoDB--service

现在,当我尝试从命令提示符运行可执行文件时,失败并显示以下消息:

无效命令:MongoDB

我在上面的路径中突出显示了这个错误的“参数”。它是传递给 serviceName 参数的参数,但 --serviceName 指令本身被错误地省略。正确的路径应该是:

C:\Tools\mongodb-win32-i386-1.6.3\bin\mongod" --bind_ip 127.0.0.1 --logpath c:/mongodb/logs/mongodb.log --logappend --dbpath "c:/mongodb/data" --directoryperdb--serviceName MongoDB--service

可能的修复方法您

可以通过更改以下项中的 ImagePath 来编辑注册表中可执行文件的路径:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MongoDB

另一种选择是在安装过程中简单地省略 serviceName 参数,因为 < a href="https://stackoverflow.com/questions/3437173/mongodb-sharding-and-multiple-windows-services">MongoDB的服务支持仍然存在缺陷。

If one of the directories in logpath or dbpath doesn't exist, it will fail to start. So make sure the paths point to existing directories.

If the paths do exist, check the log file for more information on what went wrong.

In response to your update

I have been able to reproduce the problem and noticed the error code 0xc0000417 when I tried to debug it with Visual Studio. This is a STATUS_INVALID_CRUNTIME_PARAMETER error, which means that an invalid parameter was passed to a C runtime function.

As you posted, the path to the executable is:

C:\Tools\mongodb-win32-i386-1.6.3\bin\mongod" --bind_ip 127.0.0.1 --logpath c:/mongodb/logs/mongodb.log --logappend --dbpath "c:/mongodb/data" --directoryperdbMongoDB--service

Now, when I tried to run the executable from a command prompt, it failed with the following message:

Invalid command: MongoDB

I have highlighted this faulty 'parameter' in the path above. It is the argument that is passed to the serviceName parameter, but the --serviceName directive itself was wrongly omitted. The correct path should be:

C:\Tools\mongodb-win32-i386-1.6.3\bin\mongod" --bind_ip 127.0.0.1 --logpath c:/mongodb/logs/mongodb.log --logappend --dbpath "c:/mongodb/data" --directoryperdb--serviceName MongoDB--service

Possible ways to fix it

You could edit the path to the executable in the registry, by changing the ImagePath in the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MongoDB

Another option is to simply omit the serviceName parameter during installation, because MongoDB's service support is still flawed.

忆悲凉 2024-10-02 03:38:26

我遇到了同样的问题并尝试了一些方法。最后我得到了这个问题的解决方案。

1.请检查系统组件涉及C++ Redistributable for Visual Studio 2015的环境。

2.我只需再次安装名为C++ Redistributable for Visual Studio 2015的组件即可解决此问题。

I met the same issue and try some ways. Finally I got the solution for this issue.

1.please check the environment that system components involve C++ Redistributable for Visual Studio 2015

2.i just install that component that named for C++ Redistributable for Visual Studio 2015 again, at last resolve this issue.

镜花水月 2024-10-02 03:38:26

我遇到了同样的问题。
我的解决方案:

更改 mongod.cfg 文件:

注释行 nmp:

I met the same issue.
My solution :

change the mongod.cfg file :

comment the line nmp:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文