2017-01-03 118 views
1

我通过Homebrew安装了MongoDB,并且在运行mongod命令时似乎遇到了一些麻烦。我已经尝试正确设置data/db目录并在stackoverflow上查看了一些其他答案,但一直未能弄清楚。以下是我不断收到(对不起,我是新来这个):无法启动MongoDB(Mac) - 代码:100

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 
+1

你有什么调查?找到了一个快速搜索[this](https://gist.github.com/satoryu/495913e59bb249b060cc)描述。 –

+1

确保目录'/ data/db'存在,并且MonoDB有权访问它 – RaR

回答

0

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