MongDB无法启动

时间:2017-09-20 22:01:56

标签: mongodb

我是mac新手。我正在尝试安装MongoDB。我没有使用Homebrew来安装它。在mac os x 10.12.6 macOS Sierra上的数据目录/ data / db目录中运行Mongod后程序被卡住了。

2017-09-20T16:52:33.204-0500 I CONTROL  [initandlisten] MongoDB 
starting : pid=1428 port=27017 dbpath=/data/db 64-bit host=Rohits-
MacBook-Pro.local
2017-09-20T16:52:33.204-0500 I CONTROL  [initandlisten] db version 
v3.4.9
2017-09-20T16:52:33.204-0500 I CONTROL  [initandlisten] git version: 
876ebee8c7dd0e2d992f36a848ff4dc50ee6603e
2017-09-20T16:52:33.204-0500 I CONTROL  [initandlisten] allocator: 
system
2017-09-20T16:52:33.204-0500 I CONTROL  [initandlisten] modules: none
2017-09-20T16:52:33.204-0500 I CONTROL  [initandlisten] build 
environment:
2017-09-20T16:52:33.204-0500 I CONTROL  [initandlisten]     distarch: 
x86_64
2017-09-20T16:52:33.204-0500 I CONTROL  [initandlisten]     
target_arch: x86_64
2017-09-20T16:52:33.204-0500 I CONTROL  [initandlisten] options: {}
2017-09-20T16:52:33.205-0500 I -        [initandlisten] Detected data 
files in /data/db created by the 'wiredTiger' storage engine, so 
setting the active storage engine to 'wiredTiger'.
2017-09-20T16:52:33.205-0500 I STORAGE  [initandlisten] wiredtiger_open 
config: create,cache_size=3584M,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),checkpoint=
(wait=60,log_size=2GB),statistics_log=(wait=0),
2017-09-20T16:52:33.745-0500 I CONTROL  [initandlisten] 
2017-09-20T16:52:33.745-0500 I CONTROL  [initandlisten] ** WARNING: 
Access control is not enabled for the database.
2017-09-20T16:52:33.745-0500 I CONTROL  [initandlisten] **          
Read and write access to data and configuration is unrestricted.
2017-09-20T16:52:33.745-0500 I CONTROL  [initandlisten] 
2017-09-20T16:52:33.745-0500 I CONTROL  [initandlisten] 
2017-09-20T16:52:33.745-0500 I CONTROL  [initandlisten] ** WARNING: 
soft rlimits too low. Number of files is 256, should be at least 1000
2017-09-20T16:52:33.747-0500 I FTDC     [initandlisten] Initializing 
full-time diagnostic data capture with directory 
'/data/db/diagnostic.data'
2017-09-20T16:52:33.747-0500 I NETWORK  [thread1] waiting for 
connections on port 27017

在此之后我无法前进。

1 个答案:

答案 0 :(得分:0)

从日志的最后一行可以推断出mongoDb已经启动并正在等待连接。

2017-09-20T16:52:33.747-0500 I NETWORK  [thread1] waiting for 
connections on port 27017

打开一个新终端并输入' mongo'。您将连接到mongo shell,您可以在其中输入查询。