gpt4 book ai didi

MongoDB 社区 : Failed to start up WiredTiger under any compatibility version

转载 作者:行者123 更新时间:2023-12-05 04:33:52 26 4
gpt4 key购买 nike

今天,在没有进行任何有意识的更改的情况下,我的 mongodb 社区停止工作了。

当我检查 brew 服务时,我看到错误作为状态

mongodb-community error  3584 user ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community@4.2.plist

我检查了日志,发现了这个错误:

2022-02-25T15:50:58.324-0800 I  CONTROL  [main] ***** SERVER RESTARTED *****
2022-02-25T15:50:58.330-0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2022-02-25T15:50:58.359-0800 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2022-02-25T15:50:58.360-0800 I CONTROL [initandlisten] MongoDB starting : pid=64356 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=Als-MacBook-Pro.local
2022-02-25T15:50:58.360-0800 I CONTROL [initandlisten] db version v4.2.18
2022-02-25T15:50:58.360-0800 I CONTROL [initandlisten] git version: f65ce5e25c0b26a00d091a4d24eec1a8b3a4c016
2022-02-25T15:50:58.360-0800 I CONTROL [initandlisten] allocator: system
2022-02-25T15:50:58.360-0800 I CONTROL [initandlisten] modules: none
2022-02-25T15:50:58.360-0800 I CONTROL [initandlisten] build environment:
2022-02-25T15:50:58.360-0800 I CONTROL [initandlisten] distarch: x86_64
2022-02-25T15:50:58.360-0800 I CONTROL [initandlisten] target_arch: x86_64
2022-02-25T15:50:58.360-0800 I CONTROL [initandlisten] options: { config: "/usr/local/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/usr/local/var/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/usr/local/var/log/mongodb/mongo.log" } }
2022-02-25T15:50:58.361-0800 I STORAGE [initandlisten] Detected data files in /usr/local/var/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2022-02-25T15:50:58.361-0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=7680M,cache_overflow=(file_max=0M),session_max=33000,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,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress],
2022-02-25T15:50:58.788-0800 E STORAGE [initandlisten] WiredTiger error (13) [1645833058:788043][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1645833058:788043][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2022-02-25T15:50:58.789-0800 E STORAGE [initandlisten] WiredTiger error (13) [1645833058:789197][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1645833058:789197][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2022-02-25T15:50:58.789-0800 E STORAGE [initandlisten] WiredTiger error (13) [1645833058:789360][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1645833058:789360][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2022-02-25T15:50:58.789-0800 E STORAGE [initandlisten] WiredTiger error (13) [1645833058:789507][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1645833058:789507][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2022-02-25T15:50:58.789-0800 E STORAGE [initandlisten] WiredTiger error (13) [1645833058:789685][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1645833058:789685][64356:0x11468e600], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2022-02-25T15:50:58.789-0800 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2022-02-25T15:50:58.789-0800 F STORAGE [initandlisten] Reason: 13: Permission denied
2022-02-25T15:50:58.789-0800 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 928
2022-02-25T15:50:58.789-0800 F - [initandlisten] \n\n***aborting after fassert() failure\n\n

我在 Google 和 Stack 中搜索并找到了一些解决方案,例如将 MongoDB 降级到 4.2.x 版或设置权限,但都没有用。

我能做什么?我什至会考虑丢失数据,因为这是一个带有虚拟数据的本地服务器。无论如何,我想以正确的方式修复它。

谢谢。

最佳答案

这通常发生在升级时,所以请检查您的 mongo 版本。我在几台服务器上遇到了同样的问题。避免这种情况的正确方法是在我们进行 mongo 升级之前将 FCV (featureCompatibilityVersion) 设置为正确的。在这种情况下,在我们升级到 mongo 4.4 之前应该将其设置为版本 4.2。要检查当前的 FCV,请在 mongo shell (admin db) 中运行此命令:

db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })

在我的例子中它是 4.0,所以我必须通过执行来更新它:

db.adminCommand( { setFeatureCompatibilityVersion: "4.2" } )

然后顺利升级到mongo 4.4。

如果您已经搞砸了,应该可以降级到 mongo 4.2.6 或更高版本,如上所述更新 FCV,然后升级到 mongo 4.4。根据您的日志,看起来它没有访问某些文件的权限(例如/var/lib/mongodb/),因此请确保这些文件归 mongodb 用户所有。

关于MongoDB 社区 : Failed to start up WiredTiger under any compatibility version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71301329/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com