主頁 > 知識庫 > MongoDB錯誤32-bit servers don't have journaling enabled by default解決方法

MongoDB錯誤32-bit servers don't have journaling enabled by default解決方法

熱門標簽:企業(yè)智能外呼系統(tǒng)價格多少 智能電銷機器人銷售話術(shù) 機器人外呼系統(tǒng)軟件存在問題 兗州電話外呼營銷系統(tǒng) 南京400電話怎樣辦理 高德地圖標注商戶位置 福州電銷機器人源代碼 沈陽營銷電銷機器人招商 徐州ai電銷機器人原理

每次啟動MongoDB時總是會收到如下 Unclean shutdown 提示,總結(jié)了一下出現(xiàn)該問題的原因及解決方法。

提示如下:

復(fù)制代碼 代碼如下:

**************
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

經(jīng)過多次測試發(fā)現(xiàn),造成這種情況的原因是我使用PowerCMD啟動MongoDB之后直接關(guān)掉PowerCMD窗口之后造成的,如果在關(guān)閉PowerCMD窗口之前使用 [ctrl + c] 快捷鍵終止mongod的運行也不會出現(xiàn)此種情況。而且,使用普通的CMD窗口運行mongo命令即使直接關(guān)掉窗口也不會出現(xiàn)該問題,看來還是使用原生程序更靠譜。

發(fā)生了此種情況解決方法也很簡單,使用如下參數(shù)repair即可:

復(fù)制代碼 代碼如下:

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

然后重新啟動即可:

復(fù)制代碼 代碼如下:

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:
  • 關(guān)于Mongodb參數(shù)說明與常見錯誤處理的總結(jié)
  • Mongodb常見錯誤與解決方法小結(jié)(Mongodb中經(jīng)常出現(xiàn)的錯誤)
  • 解決mongodb在ubuntu下啟動失敗,提示couldn‘t remove fs lock errno:9 Bad file descriptor的錯誤
  • mongodb錯誤tcmalloc: large alloc out of memory, printing stack and exiting解決辦法
  • 修復(fù) Mac brew 安裝 mongodb 報 Error: No available formula with the name ‘mongodb’ 問題詳解

標簽:鶴崗 丹東 大理 吉安 景德鎮(zhèn) 本溪 邯鄲 昭通

巨人網(wǎng)絡(luò)通訊聲明:本文標題《MongoDB錯誤32-bit servers don't have journaling enabled by default解決方法》,本文關(guān)鍵詞  MongoDB,錯誤,32-bit,servers,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《MongoDB錯誤32-bit servers don't have journaling enabled by default解決方法》相關(guān)的同類信息!
  • 本頁收集關(guān)于MongoDB錯誤32-bit servers don't have journaling enabled by default解決方法的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章