无法连接到MongoDB(Mac)

时间:2016-10-18 08:32:07

标签: mongodb

我已经关注this video并安装和卸载了几次MongoDB。我偶尔可以连接,但大多数时候我都不能碰到这个错误:

2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten] MongoDB starting : pid=40879 port=27017 dbpath=/data/db 64-bit host=XXX
2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten] db version v3.2.10
2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten] git version: 79d9b3ab5ce20f51c272b4411202710a082d0317
2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 0.9.8zg 14 July 2015
2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten] allocator: system
2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten] modules: none
2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten] build environment:
2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten]     distarch: x86_64
2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten]     target_arch: x86_64
2016-10-18T01:19:21.746-0700 I CONTROL  [initandlisten] options: {}
2016-10-18T01:19:21.747-0700 I -        [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2016-10-18T01:19:21.747-0700 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=9G,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),
2016-10-18T01:19:22.124-0700 I CONTROL  [initandlisten] 
2016-10-18T01:19:22.124-0700 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2016-10-18T01:19:22.125-0700 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2016-10-18T01:19:22.125-0700 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-10-18T01:19:22.125-0700 I NETWORK  [initandlisten] waiting for connections on port 27017
2016-10-18T01:19:22.126-0700 W NETWORK  [HostnameCanonicalizationWorker] Failed to obtain address information for hostname XXX: nodename nor servname provided, or not known

我看了几个主题并看到了这些解决方案:

  1. killall mongod (似乎不起作用)
  2. 更新/etc/hosts文件中的主机名,但我无法在任何地方找到此文件
  3. 对这两个步骤中的任何一个的任何帮助或其他步骤的指导将不胜感激。另外,我一直看到软限制太低'错误 - 究竟是什么意思?

0 个答案:

没有答案
相关问题