无法启动Mac OS的MongoDB。 下面是堆栈跟踪。
2019-11-25T14:29:58.537+0530 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-11-25T14:29:58.549+0530 I CONTROL [initandlisten] MongoDB starting : pid=3320 port=27017 dbpath=/data/db 64-bit host=My-MacBook-Pro.local
2019-11-25T14:29:58.549+0530 I CONTROL [initandlisten] db version v4.2.1
2019-11-25T14:29:58.549+0530 I CONTROL [initandlisten] git version: edf6d45851c0b9ee15548f0f847df141764a317e
2019-11-25T14:29:58.549+0530 I CONTROL [initandlisten] allocator: system
2019-11-25T14:29:58.549+0530 I CONTROL [initandlisten] modules: none
2019-11-25T14:29:58.549+0530 I CONTROL [initandlisten] build environment:
2019-11-25T14:29:58.549+0530 I CONTROL [initandlisten] distarch: x86_64
2019-11-25T14:29:58.549+0530 I CONTROL [initandlisten] target_arch: x86_64
2019-11-25T14:29:58.549+0530 I CONTROL [initandlisten] options: {}
2019-11-25T14:29:58.550+0530 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3584M,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],
2019-11-25T14:29:59.142+0530 E STORAGE [initandlisten] WiredTiger error (2) [1574672399:142255][3320:0x118ea25c0], file:WiredTiger.wt, connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: No such file or directory Raw: [1574672399:142255][3320:0x118ea25c0], file:WiredTiger.wt, connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: No such file or directory
2019-11-25T14:29:59.170+0530 E STORAGE [initandlisten] WiredTiger error (2) [1574672399:170638][3320:0x118ea25c0], file:WiredTiger.wt, connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: No such file or directory Raw: [1574672399:170638][3320:0x118ea25c0], file:WiredTiger.wt, connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: No such file or directory
2019-11-25T14:29:59.186+0530 E STORAGE [initandlisten] WiredTiger error (2) [1574672399:186091][3320:0x118ea25c0], file:WiredTiger.wt, connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: No such file or directory Raw: [1574672399:186091][3320:0x118ea25c0], file:WiredTiger.wt, connection: __posix_open_file, 669: /data/db/WiredTiger.wt: handle-open: open: No such file or directory
2019-11-25T14:29:59.194+0530 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2019-11-25T14:29:59.194+0530 F STORAGE [initandlisten] Reason: 2: No such file or directory
2019-11-25T14:29:59.194+0530 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 786
2019-11-25T14:29:59.194+0530 F - [initandlisten]
***aborting after fassert() failure
早期的MongoDB版本是4.2,并且可以正常工作。我需要将其降级到3.6,但失败了。之后,我再次安装了4.2。现在,Mongo 4.2也无法正常工作。
答案 0 :(得分:0)
似乎降级/升级损坏的数据库文件。
您是否按照推荐的步骤操作了4.2 to 4.0 downgrade,然后是4.0 to 3.6 downgrade?我不知道存在从4.2到3.6的直接降级。
您可以尝试使用mongod --dbpath /data/db --repair
修复数据库。
如果失败,则必须删除WiredTiger db文件,然后重新安装mongodb并从备份中还原。