今天在配置MongoDB時(shí)發(fā)生了以下幾個(gè)錯(cuò)誤, 已經(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
補(bǔ)充一下:如果存儲(chǔ)空間滿了的話也會(huì)出現(xiàn) rc:100錯(cuò)誤??偩€一下:rc:100是系統(tǒng)文件錯(cuò)誤
錯(cuò)誤原因: 之前使用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
錯(cuò)誤原因: mongodb非正常關(guān)閉 刪除mongod.lock文件即可.
ERROR: child process failed ,exited with error number 1
錯(cuò)誤原因: dbpath文件的權(quán)限問題,增加寫權(quán)限即可
mongodb.conf bind 不能寫127.0.0.1否則其它主機(jī)連接不了
情況不唯一,這邊只能當(dāng)參考,大致就是這么幾種解決思路
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后,今天早上啟動(dòng)服務(wù)的時(shí)候啟動(dòng)不了了,出現(xiàn)錯(cuò)誤如下:
錯(cuò)誤:
錯(cuò)誤2:系統(tǒng)找不到指定文件
思考過程:
昨天做測(cè)試的時(shí)候,先后安裝了兩次MongoDB,后來我又刪除(注意不是卸載)了一個(gè)MongoDB文件夾,當(dāng)前這個(gè)服務(wù)是不是默認(rèn)的MongoDB的安裝地址錯(cuò)誤呢?
查看服務(wù)屬性,Mongo的地址是已經(jīng)刪除了的個(gè)地址,而不是當(dāng)前我用的這個(gè)地址。當(dā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ù),地址改變:
再次啟動(dòng)MongoDB服務(wù),啟動(dòng)失敗,出現(xiàn)1607錯(cuò)誤。
錯(cuò)誤:
錯(cuò)誤原因:不明
解決方式:
刪除E:\Program files\mongodb\data\db目錄下的mongod.lock文件。
再次重啟服務(wù),啟動(dòng)成功。
總結(jié):
接觸一個(gè)新的東西的時(shí)候,難免出現(xiàn)錯(cuò)誤,錯(cuò)誤來了,就解決,不要躲著,拖著。
您可能感興趣的文章:- MongoDb的"not master and slaveok=false"錯(cuò)誤及解決方法
- 解決啟動(dòng)MongoDB錯(cuò)誤:error while loading shared libraries: libstdc++.so.6:cannot open shared object file:
- 關(guān)于Mongodb參數(shù)說明與常見錯(cuò)誤處理的總結(jié)
- MongoDB錯(cuò)誤32-bit servers don''t have journaling enabled by default解決方法
- 解決mongodb在ubuntu下啟動(dòng)失敗,提示couldn‘t remove fs lock errno:9 Bad file descriptor的錯(cuò)誤
- mongodb錯(cuò)誤tcmalloc: large alloc out of memory, printing stack and exiting解決辦法
- 修復(fù) Mac brew 安裝 mongodb 報(bào) Error: No available formula with the name ‘mongodb’ 問題詳解