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后,今天早上啟動服務的時候啟動不了了,出現(xiàn)錯誤如下:
錯誤:
錯誤2:系統(tǒng)找不到指定文件
思考過程:
昨天做測試的時候,先后安裝了兩次MongoDB,后來我又刪除(注意不是卸載)了一個MongoDB文件夾,當前這個服務是不是默認的MongoDB的安裝地址錯誤呢?
查看服務屬性,Mongo的地址是已經(jīng)刪除了的個地址,而不是當前我用的這個地址。當前用的地址是:E:\Program files\mongodb\bin
解決方式:
先卸載原來的安裝,再次安裝新的。
Mongo卸載:
卸載:mongod.exe --remove --serviceName "MongoDB"
MongoDB安裝為服務:
安裝:mongod.exe --install --logpath="E:\Program files\mongodb\data\log\log.txt" --dbpath="E:\Program files\mongodb\data\db"
安裝后刷新服務,地址改變:
再次啟動MongoDB服務,啟動失敗,出現(xiàn)1607錯誤。
錯誤:
錯誤原因:不明
解決方式:
刪除E:\Program files\mongodb\data\db目錄下的mongod.lock文件。
再次重啟服務,啟動成功。
總結(jié):
接觸一個新的東西的時候,難免出現(xiàn)錯誤,錯誤來了,就解決,不要躲著,拖著。
相關(guān)文章
淺談MySQL和MariaDB區(qū)別(mariadb和mysql的性能比較)
MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能輕松成為MySQL的代替品2018-02-02MongoDB分片在部署與維護管理中常見的事項總結(jié)大全
分片(sharding)是指將數(shù)據(jù)拆分,將其分散存放在不同的機器上的過程。下面這篇文章主要給大家總結(jié)介紹了關(guān)于MongoDB分片在部署與維護管理中常見事項的相關(guān)資料,文中通過圖文以及示例代碼介紹的非常詳細,需要的朋友可以參考下2018-09-09MongoDB db.serverStatus()輸出內(nèi)容中文注釋
這篇文章主要介紹了MongoDB db.serverStatus()輸出內(nèi)容中文注釋,本文收集了2個版本的中文注釋來講解,需要的朋友可以參考下2014-08-08Win10 64位安裝MongoDB數(shù)據(jù)庫的詳細教程
這篇文章主要介紹了Win10 64位安裝MongoDB數(shù)據(jù)庫的詳細教程,本文圖文并茂給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下2019-12-12