求助。存储组件升级。WiredTiger metadata corruption detected

问答  收藏
1 / 155

想启用聚合表功能,发现存储组件升级报错如下。
是 WiredTiger.wt 这个表坏了么。有靠谱的修复方法么?

root@f06d83906841:/data/mongodb# mongo
MongoDB shell version v3.4.24
connecting to: mongodb://127.0.0.1:27017
2025-01-12T23:50:38.792+0800 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2025-01-12T23:50:38.792+0800 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:240:13
@(connect):1:6
exception: connect failed
root@f06d83906841:/data/mongodb# cat upgrade-3.6.log 
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten] MongoDB starting : pid=10 port=27017 dbpath=/data/mongodb/ 64-bit host=c1ce351abcec
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten] db version v3.6.22
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten] git version: 62d9f36d148e4dacfec1ca8fcb110f1cc410336f
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2k-fips  26 Jan 2017
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten] allocator: tcmalloc
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten] modules: none
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten] build environment:
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten]     distmod: amazon2
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten]     distarch: x86_64
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten]     target_arch: x86_64
2025-01-12T14:25:47.849+0000 I CONTROL  [initandlisten] options: { processManagement: { fork: true }, storage: { dbPath: "/data/mongodb/" }, systemLog: { destination: "file", path: "/data/mongodb/upgrade-3.6.log" } }
2025-01-12T14:25:47.850+0000 I -        [initandlisten] Detected data files in /data/mongodb/ created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2025-01-12T14:25:47.850+0000 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=15574M,cache_overflow=(file_max=0M),session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),compatibility=(release="3.0",require_max="3.0"),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2025-01-12T14:25:48.373+0000 E STORAGE  [initandlisten] WiredTiger error (-31802) [1736691948:373865][10:0x7f4e35669ec0], file:WiredTiger.wt, connection: __wt_btree_tree_open, 604: unable to read root page from file:WiredTiger.wt: WT_ERROR: non-specific WiredTiger error Raw: [1736691948:373865][10:0x7f4e35669ec0], file:WiredTiger.wt, connection: __wt_btree_tree_open, 604: unable to read root page from file:WiredTiger.wt: WT_ERROR: non-specific WiredTiger error
2025-01-12T14:25:48.373+0000 E STORAGE  [initandlisten] WiredTiger error (0) [1736691948:373916][10:0x7f4e35669ec0], file:WiredTiger.wt, connection: __wt_btree_tree_open, 611: WiredTiger has failed to open its metadata Raw: [1736691948:373916][10:0x7f4e35669ec0], file:WiredTiger.wt, connection: __wt_btree_tree_open, 611: WiredTiger has failed to open its metadata
2025-01-12T14:25:48.373+0000 E STORAGE  [initandlisten] WiredTiger error (0) [1736691948:373935][10:0x7f4e35669ec0], file:WiredTiger.wt, connection: __wt_btree_tree_open, 614: This may be due to the database files being encrypted, being from an older version or due to corruption on disk Raw: [1736691948:373935][10:0x7f4e35669ec0], file:WiredTiger.wt, connection: __wt_btree_tree_open, 614: This may be due to the database files being encrypted, being from an older version or due to corruption on disk
2025-01-12T14:25:48.373+0000 E STORAGE  [initandlisten] WiredTiger error (0) [1736691948:373943][10:0x7f4e35669ec0], file:WiredTiger.wt, connection: __wt_btree_tree_open, 617: You should confirm that you have opened the database with the correct options including all encryption and compression options Raw: [1736691948:373943][10:0x7f4e35669ec0], file:WiredTiger.wt, connection: __wt_btree_tree_open, 617: You should confirm that you have opened the database with the correct options including all encryption and compression options
2025-01-12T14:25:48.375+0000 F STORAGE  [initandlisten] WiredTiger metadata corruption detected
2025-01-12T14:25:48.375+0000 F STORAGE  [initandlisten] This version of MongoDB is unable to repair this kind of corruption, but version 4.0.3+ may be able to repair it. See http://dochub.mongodb.org/core/repair for more information.
2025-01-12T14:25:48.375+0000 F -        [initandlisten] Fatal Assertion 50944 at src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp 71
2025-01-12T14:25:48.375+0000 F -        [initandlisten] \n\n***aborting after fassert() failure\n\n
root@f06d83906841:/data/mongodb#