Skip to content

Connection error with Mongo Atlas #48

Description

@eiscan

Hi,
I have a database in Mongo Atlas but cannot connect.

My connection code:

mongo = MongoHandler(host='46.222.73.115', 
                     username='testeko', 
                     password='aSd1234', 
                     database_name='TestDB')
logger.addHandler(mongo)

The original connection string
"mongodb+srv://testeko:aSd1234@.....mongodb.net/TestDB?retryWrites=true&w=majority"

It gives this error when trying to connect.
pymongo.errors.ServerSelectionTimeoutError: connection closed

Python : 3.7.4,
log4mongo : 1.7.0,
pymongo : 3.9.0

What should I do?

Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions