0

项目有个mongodb由于断电后无法启动,通过以下两种方式都无法读取到数据:
repair 模式恢复,如果元数据本身有问题,repair 模式也是无法工作的;
通过 WiredTiger 自带工具分析,对元数据损坏的情况也使用,能尽可能多的恢复数据(猜测是WiredTiger.wt文件损坏)
通过删除juournal后mongodb可启动,但是却丢失了所有数据,是否有办法直接从wt文件中把数据读取出来?
日志如下:
2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] MongoDB starting : pid=2768 port=27017 dbpath=D:\mongodb\db 64-bit host=WIN-7I7QFBOED7F

2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] targetMinOS: Windows Vista/Windows Server 2008

2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] db version v3.4.4

2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] git version: 888390515874a9debd1b6c5d36559ca86b44babd

2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] allocator: tcmalloc

2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] modules: none

2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] build environment:

2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] distarch: x86_64

2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] target_arch: x86_64

2018-05-24T12:02:52.662+0800 I CONTROL [initandlisten] options: { repair: true, storage: { dbPath: “D:\mongodb\db” } }

2018-05-24T12:02:52.663+0800 I – [initandlisten] Detected data files in D:\mongodb\db created by the ‘wiredTiger’ storage engine, so setting the active storage engine to ‘wiredTiger’.

2018-05-24T12:02:52.663+0800 I STORAGE [initandlisten] Detected WT journal files. Running recovery from last checkpoint.

2018-05-24T12:02:52.663+0800 I STORAGE [initandlisten] journal to nojournal transition config: create,cache_size=64822M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),

2018-05-24T12:02:56.060+0800 E STORAGE [initandlisten] WiredTiger error (0) [1527134576:59397][2768:8781149835856], file:collection-2-6275901123418866083.wt, WT_CURSOR.insert: read checksum error for 4096B block at offset 34094784512: block header checksum of 630942458 doesn’t match expected checksum of 2298237107

2018-05-24T12:02:56.060+0800 E STORAGE [initandlisten] WiredTiger error (0) [1527134576:59397][2768:8781149835856], file:collection-2-6275901123418866083.wt, WT_CURSOR.insert: collection-2-6275901123418866083.wt: encountered an illegal file format or internal value

2018-05-24T12:02:56.060+0800 E STORAGE [initandlisten] WiredTiger error (-31804) [1527134576:59397][2768:8781149835856], file:collection-2-6275901123418866083.wt, WT_CURSOR.insert: the process must exit and restart: WT_PANIC: WiredTiger library panic

2018-05-24T12:02:56.060+0800 I – [initandlisten] Fatal Assertion 28558 at src\mongo\db\storage\wiredtiger\wiredtiger_util.cpp 361

2018-05-24T12:02:56.060+0800 I – [initandlisten]

***aborting after fassert() failure

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\util\stacktrace_windows.cpp(239) mongo::printStackTrace+0x43

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\util\signal_handlers_synchronous.cpp(180) mongo::`anonymous namespace’::printSignalAndBacktrace+0x73

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\util\signal_handlers_synchronous.cpp(236) mongo::`anonymous namespace’::abruptQuit+0x83

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe d:\th\minkernel\crts\ucrt\src\appcrt\misc\signal.cpp(516) raise+0x25e

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe d:\th\minkernel\crts\ucrt\src\appcrt\startup\abort.cpp(71) abort+0x18

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\util\assert_util.cpp(172) mongo::fassertFailedWithLocation+0x189

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\storage\wiredtiger\wiredtiger_util.cpp(361) mongo::`anonymous namespace’::mdb_handle_error+0x1fc

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\support\err.c(275) __wt_eventv+0x376

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\support\err.c(317) __wt_err+0x32

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\support\err.c(530) __wt_illegal_value+0x5e

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\block\block_read.c(225) __wt_block_read_off+0x1c2

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\block\block_read.c(101) __wt_bm_read+0x10b

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\bt_io.c(45) __wt_bt_read+0xbc

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\bt_read.c(415) __page_read+0x13e

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\bt_read.c(525) __wt_page_in_func+0x16d

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\include\btree.i(1464) __wt_page_swap_func+0x3e

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\row_srch.c(446) __wt_row_search+0x49e

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\bt_cursor.c(706) __wt_btcur_insert+0x491

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\cursor\cur_file.c(244) __curfile_insert+0x161

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\txn\txn_recover.c(178) __txn_op_apply+0x40c

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\txn\txn_recover.c(295) __txn_log_recover+0xb8

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\log\log.c(1862) __wt_log_scan+0x74e

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\txn\txn_recover.c(543) __wt_txn_recover+0x2d4

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\conn\conn_open.c(240) __wt_connection_workers+0x30

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\conn\conn_api.c(2457) wiredtiger_open+0xb1b

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\storage\wiredtiger\wiredtiger_kv_engine.cpp(247) mongo::WiredTigerKVEngine::WiredTigerKVEngine+0x7e1

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\storage\wiredtiger\wiredtiger_init.cpp(91) mongo::`anonymous namespace’::WiredTigerFactory::create+0x12f

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\service_context_d.cpp(202) mongo::ServiceContextMongoD::initializeGlobalStorageEngine+0x59c

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\db.cpp(590) mongo::`anonymous namespace’::_initAndListen+0x749

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\db.cpp(830) mongo::`anonymous namespace’::initAndListen+0x27

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\db.cpp(1180) mongoDbMain+0x226

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\db.cpp(868) wmain+0x35

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] mongod.exe f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(253) __scrt_common_main_seh+0x11d

2018-05-24T12:02:56.161+0800 I CONTROL [initandlisten] KERNEL32.DLL BaseThreadInitThunk+0x1a

2018-05-24T12:02:56.161+0800 F – [initandlisten] Got signal: 22 (SIGABRT).

2018-05-24T12:02:56.162+0800 I CONTROL [initandlisten] *** unhandled exception 0x0000000E at 0x000007FC837489CC, terminating

2018-05-24T12:02:56.162+0800 I CONTROL [initandlisten] *** stack trace for unhandled exception:

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] KERNELBASE.dll RaiseException+0x68

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\util\signal_handlers_synchronous.cpp(237) mongo::`anonymous namespace’::abruptQuit+0x9b

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe d:\th\minkernel\crts\ucrt\src\appcrt\misc\signal.cpp(516) raise+0x25e

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe d:\th\minkernel\crts\ucrt\src\appcrt\startup\abort.cpp(71) abort+0x18

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\util\assert_util.cpp(172) mongo::fassertFailedWithLocation+0x189

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\storage\wiredtiger\wiredtiger_util.cpp(361) mongo::`anonymous namespace’::mdb_handle_error+0x1fc

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\support\err.c(275) __wt_eventv+0x376

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\support\err.c(317) __wt_err+0x32

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\support\err.c(530) __wt_illegal_value+0x5e

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\block\block_read.c(225) __wt_block_read_off+0x1c2

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\block\block_read.c(101) __wt_bm_read+0x10b

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\bt_io.c(45) __wt_bt_read+0xbc

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\bt_read.c(415) __page_read+0x13e

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\bt_read.c(525) __wt_page_in_func+0x16d

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\include\btree.i(1464) __wt_page_swap_func+0x3e

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\row_srch.c(446) __wt_row_search+0x49e

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\btree\bt_cursor.c(706) __wt_btcur_insert+0x491

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\cursor\cur_file.c(244) __curfile_insert+0x161

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\txn\txn_recover.c(178) __txn_op_apply+0x40c

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\txn\txn_recover.c(295) __txn_log_recover+0xb8

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\log\log.c(1862) __wt_log_scan+0x74e

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\txn\txn_recover.c(543) __wt_txn_recover+0x2d4

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\conn\conn_open.c(240) __wt_connection_workers+0x30

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\third_party\wiredtiger\src\conn\conn_api.c(2457) wiredtiger_open+0xb1b

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\storage\wiredtiger\wiredtiger_kv_engine.cpp(247) mongo::WiredTigerKVEngine::WiredTigerKVEngine+0x7e1

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\storage\wiredtiger\wiredtiger_init.cpp(91) mongo::`anonymous namespace’::WiredTigerFactory::create+0x12f

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\service_context_d.cpp(202) mongo::ServiceContextMongoD::initializeGlobalStorageEngine+0x59c

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\db.cpp(590) mongo::`anonymous namespace’::_initAndListen+0x749

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\db.cpp(830) mongo::`anonymous namespace’::initAndListen+0x27

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\db.cpp(1180) mongoDbMain+0x226

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe …\src\mongo\db\db.cpp(868) wmain+0x35

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] mongod.exe f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(253) __scrt_common_main_seh+0x11d

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] KERNEL32.DLL BaseThreadInitThunk+0x1a

2018-05-24T12:02:56.170+0800 I – [initandlisten]

2018-05-24T12:02:56.170+0800 I CONTROL [initandlisten] writing minidump diagnostic file C:\Program Files\MongoDB\Server\3.2018-05-24T04-02-56.mdmp

2018-05-24T12:02:56.197+0800 I CONTROL [initandlisten] *** immediate exit due to unhandled exception