无法启动“ mongod”,立即中止

时间:2018-12-18 20:39:22

标签: mongodb command-line error-handling server terminal

我无法启动我的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()失败后中止

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

1 个答案:

答案 0 :(得分:1)

仅供参考-我正在通过自制软件安装的Macbook上本地运行mongoDB。

在升级macOS之后,我遇到了这个问题-完成此操作后,我总是在我的Web开发文件中遇到权限问题。

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

  1. 打开终端
  2. 运行sudo mongod
  3. 在终端中打开新标签页
  4. 运行mongodump将数据库导出到一个文件夹中(默认情况下,它是Macintosh HD / data /
  5. 中称为“ dump”的文件夹
  6. 将此文件夹移至桌面,然后删除Macintosh HD /数据。重新创建数据和数据/数据库文件夹+检查权限
  7. 退出码头
  8. 您现在应该可以在新的终端窗口中运行mongod。打开一个新的“终端”选项卡,然后使用mongorestore -d djsb /Users/<USER_NAME>/Desktop/dump
  9. 恢复数据库