【问题标题】:Trouble Starting MongoDB (Mac) - Code: 100无法启动 MongoDB (Mac) - 代码:100
【发布时间】:2017-01-03 04:54:30
【问题描述】:

我通过 Homebrew 安装了 MongoDB,但在运行 mongod 命令时似乎无法启动。我已尝试正确设置 data/db 目录并在 stackoverflow 上查看了其他一些答案,但无法弄清楚这一点。这是我不断得到的(对不起,我是新手):

    2017-01-02T23:45:53.444-0500 I CONTROL  [initandlisten] MongoDB starting : pid=1419 port=27017 dbpath=/data/db 64-bit host=Johns-MacBook-Pro-3.local
2017-01-02T23:45:53.445-0500 I CONTROL  [initandlisten] db version v3.4.0
2017-01-02T23:45:53.445-0500 I CONTROL  [initandlisten] git version: f4240c60f005be757399042dc12f6addbc3170c1
2017-01-02T23:45:53.445-0500 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
2017-01-02T23:45:53.445-0500 I CONTROL  [initandlisten] allocator: system
2017-01-02T23:45:53.445-0500 I CONTROL  [initandlisten] modules: none
2017-01-02T23:45:53.445-0500 I CONTROL  [initandlisten] build environment:
2017-01-02T23:45:53.445-0500 I CONTROL  [initandlisten]     distarch: x86_64
2017-01-02T23:45:53.445-0500 I CONTROL  [initandlisten]     target_arch: x86_64
2017-01-02T23:45:53.445-0500 I CONTROL  [initandlisten] options: {}
2017-01-02T23:45:53.446-0500 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7680M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2017-01-02T23:45:53.447-0500 E STORAGE  [initandlisten] WiredTiger error (2) [1483418753:447985][1419:0x7fffe84c03c0], file:WiredTiger.wt, connection: /data/db/WiredTiger.wt: handle-open: open: No such file or directory
2017-01-02T23:45:53.457-0500 I -        [initandlisten] Assertion: 28595:2: No such file or directory src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 267
2017-01-02T23:45:53.458-0500 I STORAGE  [initandlisten] exception in initAndListen: 28595 2: No such file or directory, terminating
2017-01-02T23:45:53.458-0500 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2017-01-02T23:45:53.458-0500 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2017-01-02T23:45:53.458-0500 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
2017-01-02T23:45:53.458-0500 I CONTROL  [initandlisten] now exiting
2017-01-02T23:45:53.458-0500 I CONTROL  [initandlisten] shutting down with code:100

【问题讨论】:

  • 你调查了什么?快速搜索this描述找到了。
  • 确保目录/data/db 存在并且MonoDB 有权访问它

标签: mongodb homebrew


【解决方案1】:

只需在系统硬盘上创建目录 - /data/db/

【讨论】:

    【解决方案2】:

    这对我有用:sudo mongod --dbpath ~/data/db

    【讨论】:

      猜你喜欢
      • 2022-12-11
      • 2011-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-16
      相关资源
      最近更新 更多