首页 > 解决方案 > 未找到 WiredTiger cpp 文件

问题描述

我在 Ubuntu 16.04 上尝试使用 MongoDB 时遇到了一些奇怪的行为。这是 Azure 中的虚拟机。我能够设置 Mongo 并将数据放入一个集合中,所以没有问题。最近,Mongo 变得安静并开始抛出错误。我目前正在导航的错误如下:

2018-08-07T16:54:42.402+0000 I CONTROL  [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "*.*.*.*", port: 27017 }, processManagement: { timeZoneInfo: "/usr/share/zoneinfo" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2018-08-07T16:54:42.402+0000 I -        [initandlisten] Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-08-07T16:54:42.402+0000 I STORAGE  [initandlisten]
2018-08-07T16:54:42.402+0000 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-08-07T16:54:42.402+0000 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2018-08-07T16:54:42.402+0000 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=2972M,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),statistics_log=(wait=0),verbose=(recovery_progress),
2018-08-07T16:54:43.244+0000 E STORAGE  [initandlisten] WiredTiger error (-31803) [1533660883:244872][31678:0x7f6528cca9c0], txn-recover: Recovery failed: WT_NOTFOUND: item not found
2018-08-07T16:54:43.266+0000 E -        [initandlisten] Assertion: 28595:-31803: WT_NOTFOUND: item not found src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 413

我试图弄清楚该wiredtiger_ky_engine.cpp文件应该去哪里。我认为它会在安装过程中从 github repo 中提取。它抛出了相对路径,所以我觉得我应该能够找到 mongo 引擎的 cwd 将其放置在那里,但是,这似乎有点 hacky。

以前有没有人见过这个问题,如果有,有什么好的解决方法?

编辑: 当我尝试查找进程 ID 时,看起来 mongo 在根目录中运行:

sudo service mongod start && sudo pwdx $(pgrep mongod)
31190: /

我在那里创建目录无济于事,错误消息仍然存在:

E -        [initandlisten] Assertion: 28595:-31803: WT_NOTFOUND: item not found src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 413

我已经重新加载了服务,以及卸载了 mongo 并重新安装了

标签: mongodbubuntu-16.04

解决方案


看起来问题出在启动时生成的 WiredTiger.wt 文件上。存在驱动程序问题,因此我查看了解决方案来修复驱动程序。不幸的是,我没有注意它来自的版本,以及 *.wt 文件包含的其他特定于数据的属性。

我不得不删除包括所有数据的安装。一个全新的安装解决了这个问题。

总之,没看说明


推荐阅读