JacobBroughtonsMacbook:projec-6ren">
gpt4 book ai didi

mongodb - 无法启动 "mongod",立即中止

转载 作者:行者123 更新时间:2023-12-03 08:22:05 25 4
gpt4 key购买 nike

我无法启动我的 mongo 服务器。运行“mongod”时,它会给我一个错误列表,然后立即中止。

这是它给我的错误的完整列表......

> JacobBroughtonsMacbook:projects JacobBroughton$ mongod
2018-12-18T15:29:03.071-0500 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-12-18T15:29:03.082-0500 I CONTROL [initandlisten] MongoDB starting : pid=18069 port=27017 dbpath=/data/db 64-bit host=JacobBroughtonsMacbook.local
2018-12-18T15:29:03.082-0500 I CONTROL [initandlisten] db version v4.0.3
2018-12-18T15:29:03.082-0500 I CONTROL [initandlisten] git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c
2018-12-18T15:29:03.082-0500 I CONTROL [initandlisten] allocator: system
2018-12-18T15:29:03.082-0500 I CONTROL [initandlisten] modules: none
2018-12-18T15:29:03.082-0500 I CONTROL [initandlisten] build environment:
2018-12-18T15:29:03.082-0500 I CONTROL [initandlisten] distarch: x86_64
2018-12-18T15:29:03.082-0500 I CONTROL [initandlisten] target_arch: x86_64
2018-12-18T15:29:03.083-0500 I CONTROL [initandlisten] options: {}
2018-12-18T15:29:03.083-0500 I STORAGE [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-12-18T15:29:03.083-0500 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=7680M,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-12-18T15:29:03.643-0500 E STORAGE [initandlisten] WiredTiger error (13) [1545164943:643647][18069:0x1098fa5c0], wiredtiger_open: __posix_open_file, 715: /data/db/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1545164943:643647][18069:0x1098fa5c0], wiredtiger_open: __posix_open_file, 715: /data/db/WiredTiger.turtle: handle-open: open: Permission denied
2018-12-18T15:29:03.643-0500 E STORAGE [initandlisten] WiredTiger error (13) [1545164943:643942][18069:0x1098fa5c0], wiredtiger_open: __posix_open_file, 715: /data/db/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1545164943:643942][18069:0x1098fa5c0], wiredtiger_open: __posix_open_file, 715: /data/db/WiredTiger.turtle: handle-open: open: Permission denied
2018-12-18T15:29:03.644-0500 E STORAGE [initandlisten] WiredTiger error (13) [1545164943:644201][18069:0x1098fa5c0], wiredtiger_open: __posix_open_file, 715: /data/db/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1545164943:644201][18069:0x1098fa5c0], wiredtiger_open: __posix_open_file, 715: /data/db/WiredTiger.turtle: handle-open: open: Permission denied
2018-12-18T15:29:03.644-0500 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2018-12-18T15:29:03.644-0500 F STORAGE [initandlisten] Reason: 13: Permission denied
2018-12-18T15:29:03.644-0500 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 645
2018-12-18T15:29:03.644-0500 F - [initandlisten]

***在 fassert() 失败后中止

对此的任何帮助都将非常有帮助。谢谢!

最佳答案

仅供引用 - 我在我的 macbook 上本地运行 mongoDB,通过自制软件安装。

升级我的 macOS 后我遇到了这个问题 - 这样做之后,我总是在我的 web 开发文件中遇到权限问题。

无论我做什么,我似乎都无法将我的 Macintosh HD/data/db 文件夹上的文件权限更改为 mongod 将使用的权限。但是,sudo mongod确实有效。所以解决方案是:

  • 打开终端
  • 运行sudo mongod
  • 在终端中打开一个新标签
  • 运行mongodump将您的数据库导出到一个文件夹(默认情况下,它是 Macintosh HD/data/
  • 中名为“dump”的文件夹
  • 将此文件夹移动到桌面,然后删除 Macintosh HD/data。重新创建 data 和 data/db 文件夹 + 检查权限
  • 退出终端
  • 您现在应该可以运行 mongod在新的终端窗口中。打开一个新的终端选项卡并使用 mongorestore -d djsb /Users/<USER_NAME>/Desktop/dump 恢复您的数据库
  • 关于mongodb - 无法启动 "mongod",立即中止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53840714/

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