简体   繁体   中英

Error in using Using SSL with MongoDB Monitoring Service

I did edit the settings.py file in my agent installation from the help of http://mms.10gen.com/help/single/index.html#mms-requirements so that the useSslForAllConnections value is True Now when i run python agent.py I get error like this

2012-12-19 15:09:37,209 ERROR Problem collecting non-blocking data from: gobingoo:27017 - exception: Traceback (most recent call last):
  File "/home/prem/mms-agent/nonBlockingStats.py", line 56, in run
    monitorConn = self.mmsAgent.getDbConnection( self.hostKey )
  File "/home/prem/mms-agent/mmsAgent.py", line 109, in getDbConnection
    return pymongo.Connection( hostDef['mongoUri'] , slave_okay=True, ssl=True )
  File "/usr/local/lib/python2.7/dist-packages/pymongo-2.4.1-py2.7-linux-x86_64.egg/pymongo/connection.py", line 180, in __init__
    max_pool_size, document_class, tz_aware, _connect, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pymongo-2.4.1-py2.7-linux-x86_64.egg/pymongo/mongo_client.py", line 274, in __init__
    raise ConnectionFailure(str(e))
ConnectionFailure: SSL handshake failed. MongoDB may not be configured with SSL support.

What is the reason behind this..

The problem is that you are not using SSL connections with MongoDB: http://docs.mongodb.org/manual/administration/ssl/

Since this is not the case and you have turned it on in your agent MMS attempts to do a SSL handshake with the MongoDB cluster and fails.

You should set this flag within your agent settings file to false since you do not use SSL connections in your MongoDB cluster.

The setting you talk about is a specific subset for a certain scenario: http://mms.10gen.com/help/single/index.html#using-ssl-with-mms one which does not apply to you.

Just to note, I have a full cluster running, with MMS monitoring right now and everything is running SSL, so I can confirm it works. However, I enabled each host as SSL enabled individually rather than altering the agent config and restarting. That is, method 2 here:

http://mms.10gen.com/help/single/index.html#using-ssl-with-mms

You may want to try that invdividual setting just in case

To test things out first, try using the mongo shell to connect to each member of the set from the host you are running the agent, with SSL and verify that the connection succeeds:

/path/to/mongo --ssl --host --port

If that succeeds, you have verified that the agent should be able to connect, and that your MongoDB set up is working. It would probably be a good idea at that point to file an MMS issue in Jira to troubleshoot further:

https://jira.mongodb.org/browse/MMS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM