主页 > 知识库 > MongoDB错误32-bit servers don't have journaling enabled by default解决方法

MongoDB错误32-bit servers don't have journaling enabled by default解决方法

热门标签:企业智能外呼系统价格多少 智能电销机器人销售话术 机器人外呼系统软件存在问题 兖州电话外呼营销系统 南京400电话怎样办理 高德地图标注商户位置 福州电销机器人源代码 沈阳营销电销机器人招商 徐州ai电销机器人原理

每次启动MongoDB时总是会收到如下 Unclean shutdown 提示,总结了一下出现该问题的原因及解决方法。

提示如下:

复制代码 代码如下:

**************
D:\GREENT~1\PowerCmd>mongod --auth -dbpath C:\mongo\MongoDB\mongo\data
Wed May 16 16:06:50
Wed May 16 16:06:50 warning: 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
Wed May 16 16:06:50
Wed May 16 16:06:50 [initandlisten] MongoDB starting : pid=5016 port=27017 dbpath=C:\mongo\MongoDB\mongo\data 32-bit host=mxh
Wed May 16 16:06:50 [initandlisten]
Wed May 16 16:06:50 [initandlisten] ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
Wed May 16 16:06:50 [initandlisten] **       see http://blog.mongodb.org/post/137788967/32-bit-limitations
Wed May 16 16:06:50 [initandlisten] **       with --journal, the limit is lower
Wed May 16 16:06:50 [initandlisten]
Wed May 16 16:06:50 [initandlisten] db version v2.0.1, pdfile version 4.5
Wed May 16 16:06:50 [initandlisten] git version: 3a5cf0e2134a830d38d2d1aae7e88cac31bdd684
Wed May 16 16:06:50 [initandlisten] build info: windows (5, 1, 2600, 2, 'Service Pack 3') BOOST_LIB_VERSION=1_42
Wed May 16 16:06:50 [initandlisten] options: { auth: true, dbpath: "C:\mongo\MongoDB\mongo\data" }
**************
Unclean shutdown detected.
Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
*************
Wed May 16 16:06:51 [initandlisten] exception in initAndListen: 12596 old lock file, terminating
Wed May 16 16:06:51 dbexit:
Wed May 16 16:06:51 [initandlisten] shutdown: going to close listening sockets...
Wed May 16 16:06:51 [initandlisten] shutdown: going to flush diaglog...
Wed May 16 16:06:51 [initandlisten] shutdown: going to close sockets...
Wed May 16 16:06:51 [initandlisten] shutdown: waiting for fs preallocator...
Wed May 16 16:06:51 [initandlisten] shutdown: closing all files...
Wed May 16 16:06:51 [initandlisten] closeAllFiles() finished
Wed May 16 16:06:51 dbexit: really exiting now

经过多次测试发现,造成这种情况的原因是我使用PowerCMD启动MongoDB之后直接关掉PowerCMD窗口之后造成的,如果在关闭PowerCMD窗口之前使用 [ctrl + c] 快捷键终止mongod的运行也不会出现此种情况。而且,使用普通的CMD窗口运行mongo命令即使直接关掉窗口也不会出现该问题,看来还是使用原生程序更靠谱。

发生了此种情况解决方法也很简单,使用如下参数repair即可:

复制代码 代码如下:

mongod --auth -dbpath C:\mongo\MongoDB\mongo\data --repair

然后重新启动即可:

复制代码 代码如下:

D:\GREENT~1\PowerCmd>mongod --auth -dbpath C:\mongo\MongoDB\mongo\data
Wed May 16 16:44:35
Wed May 16 16:44:35 warning: 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
Wed May 16 16:44:35
Wed May 16 16:44:35 [initandlisten] MongoDB starting : pid=9616 port=27017 dbpath=C:\mongo\MongoDB\mongo\data 32-bit host=mxh
Wed May 16 16:44:35 [initandlisten]
Wed May 16 16:44:35 [initandlisten] ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
Wed May 16 16:44:35 [initandlisten] **       see http://blog.mongodb.org/post/137788967/32-bit-limitations
Wed May 16 16:44:35 [initandlisten] **       with --journal, the limit is lower
Wed May 16 16:44:35 [initandlisten]
Wed May 16 16:44:35 [initandlisten] db version v2.0.1, pdfile version 4.5
Wed May 16 16:44:35 [initandlisten] git version: 3a5cf0e2134a830d38d2d1aae7e88cac31bdd684
Wed May 16 16:44:35 [initandlisten] build info: windows (5, 1, 2600, 2, 'Service Pack 3') BOOST_LIB_VERSION=1_42
Wed May 16 16:44:35 [initandlisten] options: { auth: true, dbpath: "C:\mongo\MongoDB\mongo\data" }
Wed May 16 16:44:35 [initandlisten] waiting for connections on port 27017
Wed May 16 16:44:35 [websvr] admin web console waiting for connections on port 28017

还有一些情况会造成这种 Unclean shutdown,解决方法可参考官方文档:

http://www.mongodb.org/display/DOCS/Durability+and+Repair

您可能感兴趣的文章:
  • MongoDb的"not master and slaveok=false"错误及解决方法
  • 解决启动MongoDB错误:error while loading shared libraries: libstdc++.so.6:cannot open shared object file:
  • 关于Mongodb参数说明与常见错误处理的总结
  • Mongodb常见错误与解决方法小结(Mongodb中经常出现的错误)
  • 解决mongodb在ubuntu下启动失败,提示couldn‘t remove fs lock errno:9 Bad file descriptor的错误
  • mongodb错误tcmalloc: large alloc out of memory, printing stack and exiting解决办法
  • 修复 Mac brew 安装 mongodb 报 Error: No available formula with the name ‘mongodb’ 问题详解

标签:鹤岗 丹东 大理 吉安 景德镇 本溪 邯郸 昭通

巨人网络通讯声明:本文标题《MongoDB错误32-bit servers don't have journaling enabled by default解决方法》,本文关键词  MongoDB,错误,32-bit,servers,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《MongoDB错误32-bit servers don't have journaling enabled by default解决方法》相关的同类信息!
  • 本页收集关于MongoDB错误32-bit servers don't have journaling enabled by default解决方法的相关信息资讯供网民参考!
  • 推荐文章