2017-01-03 83 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/對系統硬盤