将mms代理报告给amazon ec2中的MMS服务

时间:2013-05-10 17:15:11

标签: mongodb amazon-ec2 mongodb-mms

我的数据库在EC2上,我已成功安装MMS代理并成功运行。 但是,当我从MMS主机检查时,它说

You do not have a monitoring agent that is sending data to MMS or hosts configured. 

当我查看日志时......它说

2013-05-10 16:49:02,810 INFO Started agent parent process - version: 1.5.7
2013-05-10 16:49:07,996 INFO Starting agent process - version 1.5.7
2013-05-10 16:49:08,002 INFO Started agent process - parent pid: 1196 - version: 1.5.7

似乎正常运行.. 检查“代理”部分时从MMS服务

ip-xx-xx-xx-xx  xxx.xxx.xxx.xxx         12  1.5.7       05-10-13 - 10:11

它显示正确。

我需要经历某种防火墙问题或出站设置吗?请帮忙......

(更新) 当我尝试从EC2实例远程登录时,我得到了这个...好像我可以telnet到mms.10gen.com

telnet mms.10gen.com 443
Trying 75.101.156.xxx...
Connected to mms.10gen.com.
Escape character is '^]'.
Connection closed by foreign host.

(另一次更新) 这是我从代理日志中得到的..似乎我得到数据库连接问题?

Problem collecting non-blocking data from: 54.215.108.xxx:27017 - exception: Traceback (most recent call last): File "/root/deploy/versions/p4n_config/master/p4n_config/resources/mms-agent/nonBlockingStats.py", line 56, in run monitorConn = self.mmsAgent.getDbConnection( self.hostKey ) File "/root/deploy/versions/p4n_config/master/p4n_config/resources/mms-agent/mmsAgent.py", line 109, in getDbConnection return pymongo.Connection( hostDef['mongoUri'] , slave_okay=True, ssl=True, document_class=bson.son.SON ) File "/usr/local/lib/python2.7/dist-packages/pymongo/connection.py", line 220, in __init__ max_pool_size, document_class, tz_aware, _connect, **kwargs) File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 336, in __init__ raise ConnectionFailure(str(e)) ConnectionFailure: could not connect to 54.215.108.xxx:27017: timed out

1 个答案:

答案 0 :(得分:0)

好的......这就解决了我的问题.. 我的mongodb和代理人在同一个例子中。我不得不打开27017(用于我的mongodb的端口)来从aws控制台进行入站连接并解决了这个问题。

例如,如果我的ec2弹性ip是1.1.1.1 在安全组中,我添加了1.1.1.1/32端口27017.这就解决了我的问题。有点奇怪,但这有帮助。