Mongodb连接不断结束

时间:2015-12-23 15:25:54

标签: linux mongodb ubuntu

我已经在标准的AWS Ubuntu 14.04服务器上运行了mongodb。在一些看似无关的服务器管理(升级,安装python virtualenv等)后,我遇到了mongodb的麻烦。在我解决了一个问题(类似于这个问题)后,我现在得到了下一个问题。

当我启动服务器(sudo service mongodb restart)时,我得到以下日志:

Wed Dec 23 15:15:14.571 [initandlisten] MongoDB starting : pid=21554 port=27017 dbpath=/var/lib/mongodb 64-bit host=ip-172-31-29-10
Wed Dec 23 15:15:14.571 [initandlisten] db version v2.4.9
Wed Dec 23 15:15:14.571 [initandlisten] git version: nogitversion
Wed Dec 23 15:15:14.571 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54
Wed Dec 23 15:15:14.571 [initandlisten] allocator: tcmalloc
Wed Dec 23 15:15:14.571 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", journal: "true", logappend: "true", logpath: "/var/log/mongodb/mongodb.log" }
Wed Dec 23 15:15:14.575 [initandlisten] journal dir=/var/lib/mongodb/journal
Wed Dec 23 15:15:14.575 [initandlisten] recover : no journal files present, no recovery needed
Wed Dec 23 15:15:14.593 [initandlisten] waiting for connections on port 27017
Wed Dec 23 15:15:14.593 [websvr] admin web console waiting for connections on port 28017
Wed Dec 23 15:15:15.337 [initandlisten] connection accepted from 127.0.0.1:45356 #1 (1 connection now open)
Wed Dec 23 15:15:15.850 [conn1] end connection 127.0.0.1:45356 (0 connections now open)
Wed Dec 23 15:15:16.191 [initandlisten] connection accepted from 127.0.0.1:45360 #2 (1 connection now open)
Wed Dec 23 15:15:16.788 [conn2] end connection 127.0.0.1:45360 (0 connections now open)
Wed Dec 23 15:15:17.130 [initandlisten] connection accepted from 127.0.0.1:45364 #3 (1 connection now open)
Wed Dec 23 15:15:18.108 [conn3] end connection 127.0.0.1:45364 (0 connections now open)
Wed Dec 23 15:15:18.439 [initandlisten] connection accepted from 127.0.0.1:45368 #4 (1 connection now open)
Wed Dec 23 15:15:18.934 [conn4] end connection 127.0.0.1:45368 (0 connections now open)
etc. 
etc. 

正如你所看到的,它不断打开和关闭连接,我不明白为什么。我四处寻找答案,但我似乎找不到相关的东西。

有人知道这可能是什么麻烦吗?!虽然它不是生产服务器,但人们确实需要在一段时间内使用它。欢迎所有提示!

1 个答案:

答案 0 :(得分:0)

这里用 mongoDB

解释很多关于连接失败的问题