ruby-on-railsrubyruby-on-rails-3mongodbmongoid3

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..


Solution

  • 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.