MongoDB日志文件显示连接已接受&不断结束连接

时间:2017-12-29 15:42:18

标签: mongodb google-compute-engine redhat

我尝试在MongoDb Redhat 7中安装GCE服务器 使用复制启动Mongod进程后,mongolog显示错误日志..

`2017-12-29T20:51:12.853+0530 I NETWORK  [initandlisten] connection accepted 
 from 10.142.0.2:38130 #53 (1 connection now open)
 2017-12-29T20:51:42.861+0530 I NETWORK  [conn53] end connection 
 10.142.0.2:38130 (0 connections now open)
 2017-12-29T20:51:42.862+0530 I NETWORK  [initandlisten] connection accepted 
 from 10.142.0.2:38136 #54 (1 connection now open)
 2017-12-29T20:52:12.868+0530 I NETWORK  [conn54] end connection 
 10.142.0.2:38136 (0 connections now open)
 2017-12-29T20:52:12.869+0530 I NETWORK  [initandlisten] connection accepted 
 from 10.142.0.2:38144 #55 (1 connection now open)
 2017-12-29T20:52:42.877+0530 I NETWORK  [conn55] end connection 
 10.142.0.2:38144 (0 connections now open)
 2017-12-29T20:52:42.877+0530 I NETWORK  [initandlisten] connection accepted 
 from 10.142.0.2:38150 #56 (1 connection now open)
 2017-12-29T20:53:12.883+0530 I NETWORK  [conn56] end connection 
 10.142.0.2:38150 (0 connections now open)
 2017-12-29T20:53:12.883+0530 I NETWORK  [initandlisten] connection accepted 
 from 10.142.0.2:38156 #57 (1 connection now open)
 2017-12-29T20:53:42.891+0530 I NETWORK  [conn57] end connection 
 10.142.0.2:38156 (0 connections now open)
 2017-12-29T20:53:42.892+0530 I NETWORK  [initandlisten] connection accepted 
 from 10.142.0.2:38162 #58 (1 connection now open)
 2017-12-29T20:54:12.900+0530 I NETWORK  [conn58] end connection 
 10.142.0.2:38162 (0 connections now open)
 2017-12-29T20:54:12.900+0530 I NETWORK  [initandlisten] connection accepted 
 from 10.142.0.2:38170 #59 (1 connection now open)
 2017-12-29T20:54:42.908+0530 I NETWORK  [conn59] end connection 
 10.142.0.2:38170 (0 connections now open)
 2017-12-29T20:54:42.908+0530 I NETWORK  [initandlisten] connection accepted 
 from 10.142.0.2:38174 #60 (1 connection now open)
 2017-12-29T20:55:12.917+0530 I NETWORK  [conn60] end connection 
 10.142.0.2:38174 (0 connections now open)

`

我可以从redhat shell连接

  

mongo --port 34672

但是当我尝试从外部IP连接时,它失败了。

检查完所有错误日志并在网上搜索后,我无法找到此错误的原因。

1 个答案:

答案 0 :(得分:0)

这些日志条目不表示错误。它只是报告连接。至于连接的原因,可能有几个:

  1. 如果您有使用MongoDB的应用程序,则这些连接可能来自该应用程序。
  2. 如果您安装了Stackdriver Monitoring等监控,这些可能是监控的连接,以从MongoDB获取统计信息。
  3. 如果您使用的是MongoDB服务器群集,则可能是它们之间的连接或健康检查。
  4. 我认为(2)或(3)特别有可能,因为它们来自内部IP地址的距离恰好相隔30秒。

    我认为您在外部连接的问题与这些消息无关。如果那是你真正关心的问题,我建议你提出一个新问题。