database 无法启动 MongoDB:Windows 中的系统错误 1067

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18670273/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 09:04:26  来源:igfitidea点击:

Cannot start MongoDB: System error 1067 in Windows

mongodbdatabase

提问by user2601995

After setting up MongoDB service on Windows Server 2008 R2 this error was raised.

在 Windows Server 2008 R2 上设置 MongoDB 服务后,出现此错误。

C:\mongodb\bin>net start MongoDB
The Mongo DB service is starting.
The Mongo DB service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

回答by user2601995

The error came from an unclean shutdown detected.

该错误来自检测到不正常关机。

Please visit http://dochub.mongodb.org/core/repairfor recovery instructions.

请访问http://dochub.mongodb.org/core/repair获取恢复说明。

a few steps will fix it (as it's written in the link above):

几个步骤将修复它(如上面的链接中所写):

1) remove the file /data/db/mongod.lock

1)删除文件 /data/db/mongod.lock

2) run mongod.exe --repair

2)运行 mongod.exe --repair

3) start the mongod service net start MongoDB

3)启动mongod服务 net start MongoDB

回答by Trishul Parmar

I was facing the same issue and I closed the other command prompt which was opened with mongoDB.exe, and hence created a lock on that executable. Simply only closing that command prompt window worked fine. Thanks for the help.

我遇到了同样的问题,我关闭了用 mongoDB.exe 打开的另一个命令提示符,因此在该可执行文件上创建了一个锁。只需关闭该命令提示符窗口就可以正常工作。谢谢您的帮助。

回答by dexing guan

If you are in the Windows. you should change the mongodb's config in the System disk.For example

如果您在 Windows 中。您应该更改系统磁盘中的 mongodb 配置。例如

1) I change C:\Windows\system32\mongodb.exe.

1)我改变了C:\Windows\system32\mongodb.exe

2) And I make the path in D:\mongodb\mongod.cfg.Before this,you should remove previous.

2)我在D:\mongodb\mongod.cfg. 中创建路径,在此之前,您应该删除以前的。

3) Finally , you can net the serve. net start mongodb.

3)最后,你可以上网了。net start mongodb.

I hope it can help you .English is not very good ,please forgive me. enter image description here

希望能帮到你。英文不是很好,请见谅。 在此处输入图片说明

回答by sen_s

I was having the problem of starting the the MongoDB. The logs are pretty descriptive and you can find suggestion from there.

我在启动 MongoDB 时遇到了问题。日志非常具有描述性,您可以从那里找到建议。

There is a 'd' folder that needs to be created within datafolder like data\dwhich was missing.

有一个“ d”文件夹需要在数据文件夹中创建,例如 丢失的data\d

This solved my problem.

这解决了我的问题。

回答by aashah7

Although, not an ideal solution, I ended up deleting all of the database files in \data\dband was then able to successfully run the MongoDBservice. Note, this will delete all of the data in the database.

虽然这不是一个理想的解决方案,但我最终删除了其中的所有数据库文件,\data\db然后能够成功运行该MongoDB服务。请注意,这将删除数据库中的所有数据。

回答by Dani

Make sure you have at least 5 Gb available space on the drive of the database. For me, clearing that space enabled the ability to restart Mongodb.

确保数据库驱动器上至少有 5 Gb 可用空间。对我来说,清除该空间能够重新启动 Mongodb。