7 months ago
I'm getting the following error when trying to connect to a mongoDB atlas cluster:
"Error querying requisitions: SSL handshake failed: mongodb.net:27017: _ssl.c:983: The handshake operation timed out (configured timeouts: connectTimeoutMS: 20000.0ms)"
I have all IP addresses whitelisted with 0.0.0.0/0 on MongoDB Atlas. Connecting to the database works when I run my code & connect locally. I want to use static IP for production but for debugging I whitelisted all IP's.
8 Replies
7 months ago
Hello,
Unfortunately this issue would be out of our hands since it would be something you need to contact Atlas for as this appears to be an issue on their side.
Status changed to Awaiting User Response railway[bot] • 7 months ago
7 months ago
Okay, I created a new project to reproduce this issue & it didn't occur. It seems to stem from the fact that I had an existing mongoDB service in my project. I cloned my development environment and removed the mongoDB service in the cloned environment. Now I can connect to my Atlas database. Could you provide more insight into why the existing mongoDB service is causing this error, this would help me come up with a less brute-force solution of transferring the Railway mongoDB service to Atlas.
Status changed to Awaiting Railway Response railway[bot] • 7 months ago
7 months ago
That is very odd, I can't imagine why having a Mongo service deployed in the project would interfere with connecting to Atlas. Is this reproducible?
Status changed to Awaiting User Response railway[bot] • 7 months ago
7 months ago
I added a mongoDB service to the project where it works, and it still works, so it's not reproducible. Is it possible for you to get and overview of the differences in the settings in each project so we can compare? The should be almost exactly the same, so maybe we can pinpoint the issue this way.
Status changed to Awaiting Railway Response railway[bot] • 7 months ago
7 months ago
Okay that's good. I can't imagine anything in the project settings that would lead to this, but maybe it is the server that the workload is hosted on. I will check that host to see if it's for some reason unable to dial out to Atlas
Status changed to Awaiting User Response railway[bot] • 7 months ago
7 months ago
Any update on the host?
Status changed to Awaiting Railway Response railway[bot] • 7 months ago
7 months ago
Hey, the host is able to connect without issue. In fact, the service deployed into your debug env is on the same host as development. You may need to involve the Mongo team to understand why this is happening, is it still occurring by the way?
Status changed to Awaiting User Response railway[bot] • 7 months ago
7 months ago
Just to confirm - the "debug" environment is able to connect to Atlas still, even without static IP enabled? But "development" is not working, which does have static IP enabled?