Hi,
I’m trying to get the “connection” test to run and it returns this error:
pymongo.errors.ServerSelectionTimeoutError: SSL handshake failed: mflix-shard-00-00.mt1jv.mongodb.net:27017: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],SSL handshake failed: mflix-shard-00-01.mt1jv.mongodb.net:27017: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],SSL handshake failed: mflix-shard-00-02.mt1jv.mongodb.net:27017: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')], Timeout: 30s, Topology Description: <TopologyDescription id: 62cddd7c848521e76373564a, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('mflix-shard-00-00.mt1jv.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect("SSL handshake failed: mflix-shard-00-00.mt1jv.mongodb.net:27017: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]")>, <ServerDescription ('mflix-shard-00-01.mt1jv.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect("SSL handshake failed: mflix-shard-00-01.mt1jv.mongodb.net:27017: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]")>, <ServerDescription ('mflix-shard-00-02.mt1jv.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect("SSL handshake failed: mflix-shard-00-02.mt1jv.mongodb.net:27017: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]")>]>
This is the address in my .ini file:
mongodb+srv://m220student:m220password@mflix.mt1jv.mongodb.net/?retryWrites=true&w=majority
While python doesn’t reach the DB, it works fine if I connect with the mongo shell with the following connection string:
mongosh "mongodb+srv://mflix.mt1jv.mongodb.net/myFirstDatabase" --apiVersion 1 --username m220student --password m220password
This is my current setup:
- OS: Windows 10 21H2 64 bit
- Python: Python 3.9.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
- MongoDB: 5.0.9 (API Version 1)
What could be wrong? I’ve tried every answer given for this topic but still doesn’t work after 2 days. Any help would be much appreciated.
Regards,
Marco