MongoDB链接失败 mongo "exception: connect failed "

发布于 2022-09-06 21:51:06 字数 4802 浏览 8 评论 0

电脑是 WIN 10 系统
我按照这个教程安装mongoDB,
http://www.runoob.com/mongodb...

但一输入 mongo 链接.就报这个错误

图片描述

已经重装过几回,也没有解决 .
也换过 dbpath 也是没用, 求大神帮助

这是那个mongodb.log 日志,

2018-03-27T14:00:19.299+0800 I CONTROL  [main] ***** SERVER RESTARTED *****
2018-03-27T14:00:19.647+0800 I CONTROL  [main] Trying to start Windows service 'MongoDB'
2018-03-27T14:00:19.648+0800 I CONTROL  [initandlisten] MongoDB starting : pid=10480 port=27017 dbpath=d:\mongodbData\db 64-bit host=DESKTOP-KEA31I3
2018-03-27T14:00:19.648+0800 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2018-03-27T14:00:19.648+0800 I CONTROL  [initandlisten] db version v3.6.3
2018-03-27T14:00:19.648+0800 I CONTROL  [initandlisten] git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
2018-03-27T14:00:19.648+0800 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips  22 Sep 2016
2018-03-27T14:00:19.648+0800 I CONTROL  [initandlisten] allocator: tcmalloc
2018-03-27T14:00:19.648+0800 I CONTROL  [initandlisten] modules: none
2018-03-27T14:00:19.648+0800 I CONTROL  [initandlisten] build environment:
2018-03-27T14:00:19.649+0800 I CONTROL  [initandlisten]     distmod: 2008plus-ssl
2018-03-27T14:00:19.649+0800 I CONTROL  [initandlisten]     distarch: x86_64
2018-03-27T14:00:19.649+0800 I CONTROL  [initandlisten]     target_arch: x86_64
2018-03-27T14:00:19.649+0800 I CONTROL  [initandlisten] options: { service: true, storage: { dbPath: "d:\mongodbData\db" }, systemLog: { destination: "file", logAppend: true, path: "d:\mongodbData\log\mongodb.log" } }
2018-03-27T14:00:19.651+0800 I -        [initandlisten] Detected data files in d:\mongodbData\db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-03-27T14:00:19.651+0800 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7632M,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),statistics_log=(wait=0),verbose=(recovery_progress),
2018-03-27T14:00:19.834+0800 I STORAGE  [initandlisten] WiredTiger message [1522130419:833660][10480:140722874245456], txn-recover: Main recovery loop: starting at 4/6272
2018-03-27T14:00:19.970+0800 I STORAGE  [initandlisten] WiredTiger message [1522130419:970024][10480:140722874245456], txn-recover: Recovering log 4 through 5
2018-03-27T14:00:20.046+0800 I STORAGE  [initandlisten] WiredTiger message [1522130420:46191][10480:140722874245456], txn-recover: Recovering log 5 through 5
2018-03-27T14:00:20.172+0800 I CONTROL  [initandlisten] 
2018-03-27T14:00:20.172+0800 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-03-27T14:00:20.172+0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2018-03-27T14:00:20.172+0800 I CONTROL  [initandlisten] 
2018-03-27T14:00:20.173+0800 I CONTROL  [initandlisten] ** WARNING: This server is bound to localhost.
2018-03-27T14:00:20.173+0800 I CONTROL  [initandlisten] **          Remote systems will be unable to connect to this server. 
2018-03-27T14:00:20.173+0800 I CONTROL  [initandlisten] **          Start the server with --bind_ip <address> to specify which IP 
2018-03-27T14:00:20.173+0800 I CONTROL  [initandlisten] **          addresses it should serve responses from, or with --bind_ip_all to
2018-03-27T14:00:20.173+0800 I CONTROL  [initandlisten] **          bind to all interfaces. If this behavior is desired, start the
2018-03-27T14:00:20.173+0800 I CONTROL  [initandlisten] **          server with --bind_ip 127.0.0.1 to disable this warning.
2018-03-27T14:00:20.173+0800 I CONTROL  [initandlisten] 
2018-03-27T14:00:20.173+0800 I CONTROL  [initandlisten] 
2018-03-27T14:00:20.173+0800 I CONTROL  [initandlisten] ** WARNING: The file system cache of this machine is configured to be greater than 40% of the total memory. This can lead to increased memory pressure and poor performance.
2018-03-27T14:00:20.174+0800 I CONTROL  [initandlisten] See http://dochub.mongodb.org/core/wt-windows-system-file-cache
2018-03-27T14:00:20.174+0800 I CONTROL  [initandlisten] 
2018-03-27T14:00:20.402+0800 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory 'd:/mongodbData/db/diagnostic.data'
2018-03-27T14:00:20.404+0800 I NETWORK  [initandlisten] waiting for connections on port 27017
2018-03-27T14:00:20.404+0800 I STORAGE  [initandlisten] Service running

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一页 2022-09-13 21:51:06

直接在bin文件夹下,将mongo拖到cmd窗口试试能运行吗

感情洁癖 2022-09-13 21:51:06

找到原因了.
是系统防火墙引起的.
关闭WIN10系统的防火墙就好了

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文