MongoDB 无法启动服务器:此版本的 mongod 不提供默认存储引擎“wiredTiger”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34243731/
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
MongoDB cannot start server: The default storage engine 'wiredTiger' is not available with this build of mongod
提问by Rahul Baruri
MongoDB server failing to start with the following error:
MongoDB 服务器无法启动,出现以下错误:
2015-12-13T00:49:12.191+0600 I CONTROL [initandlisten] options: {}
2015-12-13T00:49:12.195+0600 I STORAGE [initandlisten] exception ininitAndListen: 28663 Cannot start server. The default storage engine 'wiredTiger' is not available with this build of mongod. Please specify a different storage engine explicitly, e.g. --storageEngine=mmapv1., terminating 2015-12-13T00:49:12.195+0600 I CONTROL [initandlisten] dbexit: rc: 100
2015-12-13T00:49:12.191+0600 I CONTROL [initandlisten] 选项:{}
2015-12-13T00:49:12.195+0600 I STORAGE [initandlisten] 异常initAndListen: 28663 无法启动服务器。默认存储引擎“wiredTiger”不适用于此 mongod 版本。请明确指定不同的存储引擎,例如 --storageEngine=mmapv1.,终止 2015-12-13T00:49:12.195+0600 I CONTROL [initandlisten] dbexit: rc: 100
回答by Romain Delyfer
Well... There appears to be a version conflict: you are probably running a 32bit version of Mongo. Just do as they say and actually use the other default storage engine:
嗯...似乎存在版本冲突:您可能正在运行 32 位版本的 Mongo。就按照他们说的做,实际使用其他默认存储引擎:
Write the command as follows in your Mongo/bin directory:
在您的 Mongo/bin 目录中编写如下命令:
mongod --storageEngine=mmapv1 --dbpath [your-path]
Should solve the problem. I guess you don't quite mind about using the good old mmapv1 instead of wiredTiger do you?
应该可以解决问题。我想您不太介意使用旧的 mmapv1 而不是有线老虎,对吗?
回答by Mojammel Haque
Look carefully error, an error message is very clear that the causes and solutions for the problems, as long as we later in the installation MonogoDB command to add a parameter --storageEngine = mmapv1, will wiredTiger engine switched mmapv1 engine, you can successfully install.
仔细看error,报错信息很清楚问题的原因和解决方法,只要我们后面在安装MonogoDB命令中添加一个参数--storageEngine = mmapv1,将wiredTiger引擎切换成mmapv1引擎,就可以成功安装.
So your complete command will be as follows:
所以你的完整命令如下:
mongod --dbpath MongoDb_Location_In_Your_HDD\data --storageEngine=mmapv1
mongod --dbpath MongoDb_Location_In_Your_HDD\data --storageEngine=mmapv1
Note: MongoDb_Location_In_Your_HDD means the location where you put your MongoDb e.g.- D:\mongodb
注意:MongoDb_Location_In_Your_HDD 表示您放置 MongoDb 的位置,例如- D:\mongodb
回答by Devanathan.S
I also come across this issues when i installed mongodb 32 bit msi for windows server.
当我为 Windows 服务器安装 mongodb 32 位 msi 时,我也遇到了这个问题。
Reason could be:
原因可能是:
I think for mongodb 32 bit the database engine wont take automatically we need to explicitly give them while configuring the db path
我认为对于 mongodb 32 位数据库引擎不会自动采取我们需要在配置 db 路径时明确地给他们
The fix is below:
修复方法如下:
Run command prompt as administrator
以管理员身份运行命令提示符
d:\mongodb>mongod --dbpath "data" --storageEngine "mmapv1"
d:\mongodb>mongod --dbpath "data" --storageEngine "mmapv1"
After adding the above bold code the issue resolved.
添加上述粗体代码后,问题解决了。
Thanks Dev
感谢开发
回答by Tell Me How
You can use mongod --storageEngine=mmapv1 --dbpath "Your Path"
您可以使用 mongod --storageEngine=mmapv1 --dbpath "Your Path"
For me :
为了我 :
"C:\Program Files\MongoDB\Server\3.2\bin\mongod.exe" --storageEngine=mmapv1 --dbpath="C:\data\db"
"C:\Program Files\MongoDB\Server\3.2\bin\mongod.exe" --storageEngine=mmapv1 --dbpath="C:\data\db"
Hope it works fine for you too.
希望它也适合你。
回答by athanzhang
Because you are using the MongoDB on a 32bit machine, the storage engine wiredTiger is not supported on 32bit machine. There are two solutions of this problem:
因为您在 32 位机器上使用 MongoDB,所以 32 位机器不支持存储引擎有线老虎。这个问题有两种解决方案:
- upgrade your system to 64bit
- change your storage engine to the engines that are suitable for 32bit system,like mmapv1, and run mongod again.
- 将您的系统升级到 64 位
- 将您的存储引擎更改为适合 32 位系统的引擎,例如 mmapv1,然后再次运行 mongod。
The result is like this:
结果是这样的:
回答by Arun Kumar N
If you use 32 bit Windows system, then execute the following in the command prompt:-
如果您使用 32 位 Windows 系统,则在命令提示符下执行以下操作:-
1. Go to the bin directory of MongoDB using the command
cd C:\ProgramFile\MongoDB\Server\3.x\bin
cd C:\ProgramFile\MongoDB\Server\3.x\bin
2. Type the following command
mongod.exe --storageEngine=mmapv1
mongod.exe --storageEngine=mmapv1
and click Enter. It will solve the error. Thanks!
并单击 Enter。它将解决错误。谢谢!