新手连接 MongoDB 出错求助

2016-03-06 23:16:32 +08:00
 KittySYSU
在 Mac 上使用 MongoDB ,使用 homebrew 安装,未修改 MongoDB 的使用权限

运行 sudo mongod
2016-03-06T22:58:30.258+0800 I CONTROL [initandlisten] MongoDB starting : pid=7338 port=27017 dbpath=/data/db 64-bit host=KittyRMBP.lan
2016-03-06T22:58:30.259+0800 I CONTROL [initandlisten] db version v3.2.1
2016-03-06T22:58:30.259+0800 I CONTROL [initandlisten] git version: a14d55980c2cdc565d4704a7e3ad37e4e535c1b2
2016-03-06T22:58:30.259+0800 I CONTROL [initandlisten] allocator: system
2016-03-06T22:58:30.259+0800 I CONTROL [initandlisten] modules: none
2016-03-06T22:58:30.259+0800 I CONTROL [initandlisten] build environment:
2016-03-06T22:58:30.259+0800 I CONTROL [initandlisten] distarch: x86_64
2016-03-06T22:58:30.259+0800 I CONTROL [initandlisten] target_arch: x86_64
2016-03-06T22:58:30.259+0800 I CONTROL [initandlisten] options: {}
2016-03-06T22:58:30.260+0800 I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2016-03-06T22:58:30.260+0800 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-03-06T22:58:31.019+0800 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2016-03-06T22:58:31.019+0800 I CONTROL [initandlisten]
2016-03-06T22:58:31.020+0800 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-03-06T22:58:31.020+0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2016-03-06T22:58:31.021+0800 I NETWORK [initandlisten] waiting for connections on port 27017



2016-03-06T22:58:31.024+0800 W NETWORK [HostnameCanonicalizationWorker] Failed to obtain address information for hostname KittyRMBP.lan: nodename nor servname provided, or not known


出现最后一行报错的是不是由于权限造成的?需要怎么修改配置文件才能把最后一行的问题解决呢?
2362 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/261558

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX