2013-03-08 15 views
2

我在ec2中運行Mongo 2.2.1,我已啓用分析,並且每180秒發送一次緩慢的操作摘要石墨。每隔一陣子腳本報告錯誤(BSONElement:壞的類型113),如果我登錄到蒙戈外殼和運行db.system.profile.find()我得到一個更詳細的報告:斷言10320 BSONElement:查詢配置文件集合時錯誤的類型113 db.system.profile.find()

Mon Feb 18 09:12:48 Assertion: 10320:BSONElement: bad type 113 
0x6073f1 0x5d1aa9 0x4b0d98 0x5c17a6 0x6b3f35 0x6b6a2c 0x69be0a 0x6aa13f 0x668e46 0x668ec2 0x66a2ce 0x5cbcc4 0x4a4a14 0x4a67e6 0x7f1519bb776d 0x49f669 
mongo(_ZN5mongo15printStackTraceERSo+0x21) [0x6073f1] 
mongo(_ZN5mongo11msgassertedEiPKc+0x99) [0x5d1aa9] 
mongo(_ZNK5mongo11BSONElement4sizeEv+0x1d8) [0x4b0d98] 
mongo(_ZN5mongo16resolveBSONFieldEP9JSContextP8JSObjectljPS3_+0x146) [0x5c17a6] 
mongo(js_LookupPropertyWithFlags+0x3f5) [0x6b3f35] 
mongo(js_GetProperty+0x7c) [0x6b6a2c] 
mongo(js_Interpret+0x10ea) [0x69be0a] 
mongo(js_Execute+0x36f) [0x6aa13f] 
mongo(JS_EvaluateUCScriptForPrincipals+0x66) [0x668e46] 
mongo(JS_EvaluateUCScript+0x22) [0x668ec2] 
mongo(JS_EvaluateScript+0x6e) [0x66a2ce] 
mongo(_ZN5mongo7SMScope4execERKNS_10StringDataERKSsbbbi+0x144) [0x5cbcc4] 
mongo(_Z5_mainiPPc+0x26c4) [0x4a4a14] 
mongo(main+0x26) [0x4a67e6] 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f1519bb776d] 
mongo(__gxx_personality_v0+0x2a1) [0x49f669] 
Error: BSONElement: bad type 113 

在日誌中我可以看到當腳本運行和報告的錯誤:

Mon Feb 18 09:26:21 [conn577444] Assertion: 10320:BSONElement: bad type 113 
0xaf8c41 0xabedb9 0x570aab 0x7fc84c 0x7fe2ca 0x8057a7 0x806268 0x651171 0x82c71e 0x82c7d4 0x8318f6 0x8345f3 0x7b0b0d 0x7b20e2 0x56fe42 0xae6ed1 0x7f0eb2526e9a 0x7f0eb183c4bd 
/opt/mongodb/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xaf8c41] 
/opt/mongodb/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x99) [0xabedb9] 
/opt/mongodb/bin/mongod(_ZNK5mongo11BSONElement4sizeEv+0x1cb) [0x570aab] 
/opt/mongodb/bin/mongod(_ZNK5mongo7Matcher13matchesDottedEPKcRKNS_11BSONElementERKNS_7BSONObjEiRKNS_14ElementMatcherEbPNS_12MatchDetailsE+0x153c) [0x7fc84c] 
/opt/mongodb/bin/mongod(_ZNK5mongo7Matcher7matchesERKNS_7BSONObjEPNS_12MatchDetailsE+0xfa) [0x7fe2ca] 
/opt/mongodb/bin/mongod(_ZNK5mongo19CoveredIndexMatcher7matchesERKNS_7BSONObjERKNS_7DiskLocEPNS_12MatchDetailsEb+0xc7) [0x8057a7] 
/opt/mongodb/bin/mongod(_ZNK5mongo19CoveredIndexMatcher14matchesCurrentEPNS_6CursorEPNS_12MatchDetailsE+0xa8) [0x806268] 
/opt/mongodb/bin/mongod(_ZN5mongo6Cursor14currentMatchesEPNS_12MatchDetailsE+0x41) [0x651171] 
/opt/mongodb/bin/mongod(_ZN5mongo20QueryResponseBuilder14currentMatchesERNS_12MatchDetailsE+0x1e) [0x82c71e] 
/opt/mongodb/bin/mongod(_ZN5mongo20QueryResponseBuilder8addMatchEv+0x44) [0x82c7d4] 
/opt/mongodb/bin/mongod(_ZN5mongo23queryWithQueryOptimizerEiRKSsRKNS_7BSONObjERNS_5CurOpES4_S4_RKN5boost10shared_ptrINS_11ParsedQueryEEES4_RKNS_17ShardChunkVersionERNS7_10scoped_ptrINS_25PageFaultRetryableSectionEEERNSG_INS_19NoPageFaultsAllowedEEERNS_7MessageE+0x376) [0x8318f6] 
/opt/mongodb/bin/mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x1a93) [0x8345f3] 
/opt/mongodb/bin/mongod() [0x7b0b0d] 
/opt/mongodb/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x3a2) [0x7b20e2] 
/opt/mongodb/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x82) [0x56fe42] 
/opt/mongodb/bin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x411) [0xae6ed1] 
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7f0eb2526e9a] 
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f0eb183c4bd] 
Mon Feb 18 09:26:21 [conn577444] assertion 10320 BSONElement: bad type 113 ns:mydb.system.profile query:{ ts: { $gte: new Date(1361179280953), $lte: new Date(1361179580953) } } 
Mon Feb 18 09:26:21 [conn577444] problem detected during query over mydb.system.profile : { $err: "BSONElement: bad type 113", code: 10320 } 

該腳本將查詢個人資料收集自最後一次緩慢的操作它跑(TS:{$ GTE:新的Date(1361179280953) ,$ lte:new Date(1361179580953)})

我對MongoDB相當陌生,任何幫助ppreciated。

感謝,

西蒙娜

回答

3

這通常意味着你有數據損壞,由不正常關機可能引起的。如果您沒有太多數據,則可以在數據庫上運行repair - 或者,最好是在某處備份備份時,從備份中還原數據。

(總是建議您使用replication運行,部分是因爲如果您遇到損壞,您將擁有數據備份。)