Iresharma
Iresharma
RRailway
Created by Iresharma on 1/20/2024 in #✋|help
I created a new mongodb instance and now I cannpt connect to it
I have a flask server that's trying to connect to the mongo instance, and now I am getting the following error
pymongo.errors.ServerSelectionTimeoutError: SSL handshake failed: roundhouse.proxy.rlwy.net:27094: TLS/SSL connection has been closed (EOF) (_ssl.c:1131) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms), Timeout: 30s, Topology Description: <TopologyDescription id: 65ac085162029dcb3b4f3b65, topology_type: Unknown, servers: [<ServerDescription ('roundhouse.proxy.rlwy.net', 27094) server_type: Unknown, rtt: None, error=AutoReconnect('SSL handshake failed: roundhouse.proxy.rlwy.net:27094: TLS/SSL connection has been closed (EOF) (_ssl.c:1131) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)')>]>
pymongo.errors.ServerSelectionTimeoutError: SSL handshake failed: roundhouse.proxy.rlwy.net:27094: TLS/SSL connection has been closed (EOF) (_ssl.c:1131) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms), Timeout: 30s, Topology Description: <TopologyDescription id: 65ac085162029dcb3b4f3b65, topology_type: Unknown, servers: [<ServerDescription ('roundhouse.proxy.rlwy.net', 27094) server_type: Unknown, rtt: None, error=AutoReconnect('SSL handshake failed: roundhouse.proxy.rlwy.net:27094: TLS/SSL connection has been closed (EOF) (_ssl.c:1131) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)')>]>
here's the snippet that connects to the db
uri = environ.get('MONGO_URI')

# Create a new client and connect to the server
client = MongoClient(uri, server_api=ServerApi('1'), tls=True, tlsCAFile=where())
DB = client['reach-page-analytics']
uri = environ.get('MONGO_URI')

# Create a new client and connect to the server
client = MongoClient(uri, server_api=ServerApi('1'), tls=True, tlsCAFile=where())
DB = client['reach-page-analytics']
3 replies