Mongodb常見錯誤與解決方法小結(jié)(Mongodb中經(jīng)常出現(xiàn)的錯誤)
今天在配置MongoDB時發(fā)生了以下幾個錯誤, 已經(jīng)被我解決了,提供給大家.
2015-05-12T09:30:26.313+0800 I STORAGE [initandlisten] exception in initAndListen: 28574 Cannot start server. Detected data files in /root/Desktop/mongodb/data created by storage engine 'mmapv1'. The configured storage engine is 'wiredTiger'., terminating
2015-05-12T09:30:26.313+0800 I CONTROL [initandlisten] dbexit: rc: 100
2015-05-12T09:31:53.043+0800 I CONTROL ***** SERVER RESTARTED *****
2015-05-12T09:31:53.049+0800 I STORAGE [initandlisten] exception in initAndListen: 28574 Cannot start server. Detected data files in /root/Desktop/mongodb/data created by storage engine 'mmapv1'. The configured storage engine is 'wiredTiger'., terminating
2015-05-12T09:31:53.050+0800 I CONTROL [initandlisten] dbexit: rc: 100
補充一下:如果存儲空間滿了的話也會出現(xiàn) rc:100錯誤??偩€一下:rc:100是系統(tǒng)文件錯誤
錯誤原因: 之前使用mmapv1創(chuàng)建的數(shù)據(jù)庫不能使用wiredTiger打開,需要重新指定dbpath
[root@localhost Desktop]# Python mongodb.py
about to fork child process, waiting until server is ready for connections.
about to fork child process, waiting until server is ready for connections.
forked process: 36411
forked process: 36412
about to fork child process, waiting until server is ready for connections.
forked process: 36414
ERROR: child process failed, exited with error number 100
ERROR: child process failed, exited with error number 100
ERROR: child process failed, exited with error number 100
錯誤原因: mongodb非正常關(guān)閉 刪除mongod.lock文件即可.
ERROR: child process failed ,exited with error number 1
錯誤原因: dbpath文件的權(quán)限問題,增加寫權(quán)限即可
mongodb.conf bind 不能寫127.0.0.1否則其它主機連接不了
情況不唯一,這邊只能當參考,大致就是這么幾種解決思路
child process failed, exited with error number 1

child process failed, exited with error number 48

child process failed, exited with error number 100

前今天裝了MongoDB后,今天早上啟動服務(wù)的時候啟動不了了,出現(xiàn)錯誤如下:
錯誤:
錯誤2:系統(tǒng)找不到指定文件

思考過程:
昨天做測試的時候,先后安裝了兩次MongoDB,后來我又刪除(注意不是卸載)了一個MongoDB文件夾,當前這個服務(wù)是不是默認的MongoDB的安裝地址錯誤呢?
查看服務(wù)屬性,Mongo的地址是已經(jīng)刪除了的個地址,而不是當前我用的這個地址。當前用的地址是:E:\Program files\mongodb\bin

解決方式:
先卸載原來的安裝,再次安裝新的。
Mongo卸載:
卸載:mongod.exe --remove --serviceName "MongoDB"

MongoDB安裝為服務(wù):
安裝:mongod.exe --install --logpath="E:\Program files\mongodb\data\log\log.txt" --dbpath="E:\Program files\mongodb\data\db"

安裝后刷新服務(wù),地址改變:

再次啟動MongoDB服務(wù),啟動失敗,出現(xiàn)1607錯誤。
錯誤:

錯誤原因:不明
解決方式:
刪除E:\Program files\mongodb\data\db目錄下的mongod.lock文件。
再次重啟服務(wù),啟動成功。
總結(jié):
接觸一個新的東西的時候,難免出現(xiàn)錯誤,錯誤來了,就解決,不要躲著,拖著。
相關(guān)文章
關(guān)于單臺MongoDB實例開啟Oplog的過程詳解
這篇文章主要給大家介紹了關(guān)于單臺MongoDB實例開啟Oplog的相關(guān)資料,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2018-09-09
分析MongoDB和MySQL各自的關(guān)鍵特性、差別和優(yōu)勢
MongoDB 和 MySQL 都是不錯的數(shù)據(jù)庫,都具有優(yōu)良的性能。然而,它們是否成功取決于應(yīng)用場景。首先應(yīng)當了解它們各自不同的運行環(huán)境,而不能只比較各自的優(yōu)點和缺點。因此,在本文中,我們將探討 MongoDB 和 MySQL 各自的關(guān)鍵特性、差別和優(yōu)勢。2021-06-06
MongoDB創(chuàng)建用戶報錯command createUser requires auth
這篇文章主要介紹了MongoDB創(chuàng)建用戶報錯command createUser requires authentication的解決方法,文中通過代碼和圖文講解的非常詳細,對大家的解決問題有一定的幫助,需要的朋友可以參考下2024-09-09
MongoDB??數(shù)據(jù)模型的設(shè)計模式及優(yōu)缺點
這篇文章主要介紹了MongoDB??數(shù)據(jù)模型的設(shè)計模式,在實際開發(fā)中,大多數(shù)性能問題都可以追溯到糟糕的模型設(shè)計,官方也提供分享過文檔模型設(shè)計的進階技巧,這里簡單翻譯記錄一下,需要的朋友可以參考下2022-12-12

