默认情况下,32位服务器未启用日记功能。如果你想要耐久性,请使用--journal。 - 无法在Windows 7 32位上启动mongo

时间:2016-03-28 09:47:47

标签: mongodb

我无法在Windows 32位系统上启动mongodb。我在C:驱动器中创建了\ data \ db。现在,当尝试运行mongod命令时,给出了以下错误:

C:\Program Files\MongoDB\Server\3.2\bin>mongod.exe
2016-03-28T15:14:55.942+0530 I CONTROL  [main]
2016-03-28T15:14:55.942+0530 W CONTROL  [main] 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
2016-03-28T15:14:55.942+0530 I CONTROL  [main]
2016-03-28T15:14:55.942+0530 I CONTROL  [main] Hotfix KB2731284 or later update is not installed, will zero-out data files
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten] MongoDB starting : pid=6200 port=27017 dbpath=C:\data\db\ 32-bit host=PC265682
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten] targetMinOS: Windows Vista/Windows Server 2008
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten] db version v3.2.4
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten] git version: e2ee9ffcf9f5a94fad76802e28cc978718bb7a30
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten] allocator: tcmalloc
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten] modules: none
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten] build environment:
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten]     distarch: i386
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten]     target_arch: i386
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten] options: {}
2016-03-28T15:14:55.942+0530 I STORAGE  [initandlisten] exception in initAndListen: 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
2016-03-28T15:14:55.942+0530 I CONTROL  [initandlisten] dbexit:  rc: 100

C:\Program Files\MongoDB\Server\3.2\bin>

4 个答案:

答案 0 :(得分:9)

真正的错误是class MyStr: def __init__(self,val): self.val=val def __repr__(self): #this function is called by dict to get a string for the class return self.val def setVal(self,val): self.val=val a=MyStr("abcd") b={1:a} print(b) #prints {1:"abcd"} a.setVal("cdef") print(b) #prints {1:"cdef"} ,最简单的解决方案就是遵循这个例子。

e.g。 Cannot start server. The default storage engine 'wiredTiger' is not available with this build of mongod. Please specify a different storage engine explicitly

有关MongoDB存储引擎的更多信息,请参阅https://docs.mongodb.org/manual/core/storage-engines/

答案 1 :(得分:5)

最有可能在mongodb_installation / bin中运行mongod.exe --storageEngine=mmapv1,它将修复错误。

如果您收到另一个错误:检测到不干净关机 - mongod.lock不为空,请尝试  链接Recover a Standalone after an Unexpected Shutdown

运行mongod.exe --dbpath /data/db --repair

它对我有用。

答案 2 :(得分:2)

2017 --- MongoDB Virsion 3.2.16

我得到了解决方案并且我认为实际问题是 --journal

mongod.exe --dbpath F:\data\db --journal --storageEngine=mmapv1

Source Link ... Solution link 这个网站完美地解释了它。

我的MongoDB正在运行

答案 3 :(得分:2)

最简单的解决方案是遵循以下示例:

mongod.exe --storageEngine=mmapv1 --dbpath "E:\mongodb\data"