2

私はMongoDBコレクションを思ったよりも早くいっぱいにし、基本的にディスク容量を使い果たしましたが、それを不潔に終了したと思います。Homebrewを使用してMongoDBを再インストールしようとしましたが、次のようなエラーが発生し、修正方法がわかりません。

Fri Oct 19 20:40:20 [initandlisten] MongoDB starting : pid=12791 port=27017 

dbpath=/usr/local/var/mongodb 64-bit host=Evan-Zamirs-MacBook-Air.local
Fri Oct 19 20:40:20 [initandlisten] 
Fri Oct 19 20:40:20 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Fri Oct 19 20:40:20 [initandlisten] db version v2.2.0, pdfile version 4.5
Fri Oct 19 20:40:20 [initandlisten] git version: f5e83eae9cfbec7fb7a071321928f00d1b0c5207
Fri Oct 19 20:40:20 [initandlisten] build info: Darwin bs-osx-106-x86-64-1.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_49
Fri Oct 19 20:40:20 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/usr/local/etc/mongod.conf", dbpath: "/usr/local/var/mongodb" }
Fri Oct 19 20:40:20 [initandlisten] journal dir=/usr/local/var/mongodb/journal
Fri Oct 19 20:40:20 [initandlisten] recover : no journal files present, no recovery needed
Fri Oct 19 20:40:20 [initandlisten]  test.system.namespaces Assertion failure isOk() src/mongo/db/pdfile.h 360
0x10037637b 0x1000b0196 0x10029eb1b 0x1002a3838 0x10013056b 0x10056c80b 0x1005708f7 0x100570d75 0x1000828cb 0x100084f13 0x1006464c9 0x1006494d6 0x10064aec9 0x100175487 0x1001ac2df 0x10063efbf 0x100004ca6 0x100005815 0x10000608d 0x10000d534 
 0   mongod                              0x000000010037637b _ZN5mongo15printStackTraceERSo + 43
 1   mongod                              0x00000001000b0196 _ZN5mongo12verifyFailedEPKcS1_j + 310
 2   mongod                              0x000000010029eb1b _ZN5mongo11DataFileMgr7findAllEPKcRKNS_7DiskLocE + 1659
 3   mongod                              0x00000001002a3838 _ZN5mongo13findTableScanEPKcRKNS_7BSONObjERKNS_7DiskLocE + 312
 4   mongod                              0x000000010013056b _ZNK5mongo9QueryPlan9newCursorERKNS_7DiskLocE + 603
 5   mongod                              0x000000010056c80b _ZN5mongo15CursorGenerator16singlePlanCursorEv + 443
 6   mongod                              0x00000001005708f7 _ZN5mongo15CursorGenerator8generateEv + 199
 7   mongod                              0x0000000100570d75 _ZN5mongo25NamespaceDetailsTransient9getCursorEPKcRKNS_7BSONObjES5_RKNS_24QueryPlanSelectionPolicyEPbRKN5boost10shared_ptrIKNS_11ParsedQueryEEEbPNS_16QueryPlanSummaryE + 69
 8   mongod                              0x00000001000828cb _ZN5mongo23queryWithQueryOptimizerEiRKSsRKNS_7BSONObjERNS_5CurOpES4_S4_RKN5boost10shared_ptrINS_11ParsedQueryEEES4_RKNS_17ShardChunkVersionERNS7_10scoped_ptrINS_25PageFaultRetryableSectionEEERNSG_INS_19NoPageFaultsAllowedEEERNS_7MessageE + 363
 9   mongod                              0x0000000100084f13 _ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 3187
 10  mongod                              0x00000001006464c9 _ZN5mongoL13receivedQueryERNS_6ClientERNS_10DbResponseERNS_7MessageE + 393
 11  mongod                              0x00000001006494d6 _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 950
 12  mongod                              0x000000010064aec9 _ZN5mongo14DBDirectClient4callERNS_7MessageES2_bPSs + 121
 13  mongod                              0x0000000100175487 _ZN5mongo14DBClientCursor4initEv + 167
 14  mongod                              0x00000001001ac2df _ZN5mongo12DBClientBase5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii + 191
 15  mongod                              0x000000010063efbf _ZN5mongo14DBDirectClient5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii + 79
 16  mongod                              0x0000000100004ca6 _ZN5mongo19clearTmpCollectionsEv + 710
 17  mongod                              0x0000000100005815 _ZN5mongo14_initAndListenEi + 1093
 18  mongod                              0x000000010000608d _ZN5mongo13initAndListenEi + 29
 19  mongod                              0x000000010000d534 _ZL11mongoDbMainiPPc + 29348
Fri Oct 19 20:40:20 [initandlisten] assertion 0 assertion src/mongo/db/pdfile.h:360 ns:test.system.namespaces query:{ options.temp: { $in: [ true, 1 ] } }
Fri Oct 19 20:40:20 [initandlisten] problem detected during query over test.system.namespaces : { $err: "assertion src/mongo/db/pdfile.h:360" }
Fri Oct 19 20:40:20 [initandlisten]  tutorial.system.namespaces Assertion failure isOk() src/mongo/db/pdfile.h 360
0x10037637b 0x1000b0196 0x10029eb1b 0x1002a3838 0x10013056b 0x10056c80b 0x1005708f7 0x100570d75 0x1000828cb 0x100084f13 0x1006464c9 0x1006494d6 0x10064aec9 0x100175487 0x1001ac2df 0x10063efbf 0x100004ca6 0x100005815 0x10000608d 0x10000d534 
0x10037637b 0x1000b0196 0x10029eb1b 0x1002a3838 0x10013056b 0x10056c80b 0x1005708f7 

0x100570d75 0x1000828cb 0x100084f13 0x1006464c9 0x1006494d6 0x10064aec9 0x100175487 0x1001ac2df 0x10063efbf 0x100004ca6 0x100005815 0x10000608d 0x10000d534 
 0   mongod                              0x000000010037637b _ZN5mongo15printStackTraceERSo + 43
 1   mongod                              0x00000001000b0196 _ZN5mongo12verifyFailedEPKcS1_j + 310
 2   mongod                              0x000000010029eb1b _ZN5mongo11DataFileMgr7findAllEPKcRKNS_7DiskLocE + 1659
 3   mongod                              0x00000001002a3838 _ZN5mongo13findTableScanEPKcRKNS_7BSONObjERKNS_7DiskLocE + 312
 4   mongod                              0x000000010013056b _ZNK5mongo9QueryPlan9newCursorERKNS_7DiskLocE + 603
 5   mongod                              0x000000010056c80b _ZN5mongo15CursorGenerator16singlePlanCursorEv + 443
 6   mongod                              0x00000001005708f7 _ZN5mongo15CursorGenerator8generateEv + 199
 7   mongod                              0x0000000100570d75 _ZN5mongo25NamespaceDetailsTransient9getCursorEPKcRKNS_7BSONObjES5_RKNS_24QueryPlanSelectionPolicyEPbRKN5boost10shared_ptrIKNS_11ParsedQueryEEEbPNS_16QueryPlanSummaryE + 69
 8   mongod                              0x00000001000828cb _ZN5mongo23queryWithQueryOptimizerEiRKSsRKNS_7BSONObjERNS_5CurOpES4_S4_RKN5boost10shared_ptrINS_11ParsedQueryEEES4_RKNS_17ShardChunkVersionERNS7_10scoped_ptrINS_25PageFaultRetryableSectionEEERNSG_INS_19NoPageFaultsAllowedEEERNS_7MessageE + 363
 9   mongod                              0x0000000100084f13 _ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 3187
 10  mongod                              0x00000001006464c9 _ZN5mongoL13receivedQueryERNS_6ClientERNS_10DbResponseERNS_7MessageE + 393
 11  mongod                              0x00000001006494d6 _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 950
 12  mongod                              0x000000010064aec9 _ZN5mongo14DBDirectClient4callERNS_7MessageES2_bPSs + 121
 13  mongod                              0x0000000100175487 _ZN5mongo14DBClientCursor4initEv + 167
 14  mongod                              0x00000001001ac2df _ZN5mongo12DBClientBase5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii + 191
 15  mongod                              0x000000010063efbf _ZN5mongo14DBDirectClient5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii + 79
 16  mongod                              0x0000000100004ca6 _ZN5mongo19clearTmpCollectionsEv + 710
 17  mongod                              0x0000000100005815 _ZN5mongo14_initAndListenEi + 1093
 18  mongod                              0x000000010000608d _ZN5mongo13initAndListenEi + 29
 19  mongod                              0x000000010000d534 _ZL11mongoDbMainiPPc + 29348
Fri Oct 19 20:40:20 [initandlisten] assertion 0 assertion src/mongo/db/pdfile.h:360 ns:tutorial.system.namespaces query:{ options.temp: { $in: [ true, 1 ] } }
Fri Oct 19 20:40:20 [initandlisten] problem detected during query over tutorial.system.namespaces : { $err: "assertion src/mongo/db/pdfile.h:360" }
Fri Oct 19 20:40:20 [initandlisten] Dropping old temporary collection: 
Fri Oct 19 20:40:20 [initandlisten] exception in initAndListen: 10011 no collection name, terminating
Fri Oct 19 20:40:20 dbexit: 
Fri Oct 19 20:40:20 [initandlisten] shutdown: going to close listening sockets...
Fri Oct 19 20:40:20 [initandlisten] shutdown: going to flush diaglog...
Fri Oct 19 20:40:20 [initandlisten] shutdown: going to close sockets...
Fri Oct 19 20:40:20 [initandlisten] shutdown: waiting for fs preallocator...
Fri Oct 19 20:40:20 [initandlisten] shutdown: lock for final commit...
Fri Oct 19 20:40:20 [initandlisten] shutdown: final commit...
Fri Oct 19 20:40:20 [initandlisten] shutdown: closing all files...
Fri Oct 19 20:40:20 [initandlisten] closeAllFiles() finished
Fri Oct 19 20:40:20 [initandlisten] journalCleanup...
Fri Oct 19 20:40:20 [initandlisten] removeJournalFiles
Fri Oct 19 20:40:20 [initandlisten] shutdown: removing fs lock...
Fri Oct 19 20:40:20 dbexit: really exiting now
4

2 に答える 2

2

データベースが破損しているようで、データベースで実行する必要がありrepairます。修復プロセスは基本的にデータベースを再構築し、疑わしいデータをスキップします。データベースの余分なコピー (または少なくともコピー可能な「適切な」データ) に十分なスペースが一時的に必要になるため、まだディスク容量が不足している場合、これはオプションではない可能性があります。

以下を使用して、すべてのデータベースを修復できます。

`mongod --repair`

より多くのスペースを備えた別のドライブがマウントされている場合は、--repairpath引数を渡して、修復中に作成された一時ファイルに別のパスを使用するように修復できます。

起動時にクラッシュしない場合は、db を使用してシェルmongod内から個々のデータベースで修復を実行するオプションもあります。mongo

デシベル.repairDatabase()

行ったように MongoDB を再インストールしても、データ ファイルの問題は修正されません。データに関心がない場合 (たとえば、上記のログの抜粋参照testおよびtutorial) .. データ ディレクトリを削除して、最初からやり直すこともできます。データ ディレクトリは次のようになります: /usr/local/var/mongodb.

于 2012-10-20T11:56:30.720 に答える