今天,我没有做任何明显的更改,我的mongodb-community停止工作了。
当我检查了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
我在谷歌和Stack中搜索并找到了一些解决方案,例如将MongoDB降级至版本4.2.x或设置权限,但这些都没有起作用。
我应该怎么办?即使这是一个带有虚拟数据的本地服务器,我也可以考虑丢失数据。无论如何,我想以正确的方式解决它。
谢谢。