914
Views
7
Comments
[MongoDB] Connecting to MongoDB Atlas
Question
mongodb
Web icon
Forge asset by OutSystems Lab

Platform 10, Cloud Outsystems Environment but also Cloud MongoDB 

Added the MongoDB Atlas connection string.  Getting the following error...

Internal Error

Error:
A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{ ReadPreference = { Mode : Primary } }, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/tracking0-shard-00-00-ysmie.mongodb.net:27017" }", EndPoint: "Unspecified/tracking0-shard-00-00-ysmie.mongodb.net:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.InvalidOperationException: Invalid BinaryConnection state transition from 2 to Failed.

... [Good bit more as to the location of the exception]

Could use help getting through this.



UserImage.jpg
Tony Freeman

Tony Freeman wrote:

Platform 10, Cloud Outsystems Environment but also Cloud MongoDB 

Added the MongoDB Atlas connection string.  Getting the following error...

Internal Error

Error:
A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{ ReadPreference = { Mode : Primary } }, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/tracking0-shard-00-00-ysmie.mongodb.net:27017" }", EndPoint: "Unspecified/tracking0-shard-00-00-ysmie.mongodb.net:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.InvalidOperationException: Invalid BinaryConnection state transition from 2 to Failed.

... [Good bit more as to the location of the exception]

Could use help getting through this.



MongoDB Atlas requires any client application ip address to be manually white listed.  I opened up the Atlas to take any connection and the app worked without error.  Now to find the Outsystems platform ip range...


2019-02-21 06-10-00
gurgen10

Tony Freeman wrote:

Tony Freeman wrote:

Platform 10, Cloud Outsystems Environment but also Cloud MongoDB 

Added the MongoDB Atlas connection string.  Getting the following error...

Internal Error

Error:
A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{ ReadPreference = { Mode : Primary } }, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/tracking0-shard-00-00-ysmie.mongodb.net:27017" }", EndPoint: "Unspecified/tracking0-shard-00-00-ysmie.mongodb.net:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.InvalidOperationException: Invalid BinaryConnection state transition from 2 to Failed.

... [Good bit more as to the location of the exception]

Could use help getting through this.



MongoDB Atlas requires any client application ip address to be manually white listed.  I opened up the Atlas to take any connection and the app worked without error.  Now to find the Outsystems platform ip range...

I have the same problem, 

Can you give more detail answer with screenshots if necessary?

Thank you in advance.


UserImage.jpg
Bruno Demantova

So, is it not possible to utilize this extension to connect to a MongoDB Atlas account?

UserImage.jpg
Jennifer Galvin

You can - you just have to make sure anything can connect to it under the "Network" setting.

UserImage.jpg
Jennifer Galvin

A good question might be, which IPs / domain names should be whitelisted?  

UserImage.jpg
pavel duchovny

Hi,


I also tried to use the SRV connection string and it fails with Invalid connection string error. Now the driver should support SRV records but for some reason the extenssion does not.


Is that expected? How can we collaborate to improve that?


Thanks,

Pavel

2022-11-14 17-25-57
Daniel Johnson

Did anyone ever figure this out? I am trying to use this integration and would prefer to whitelist only my environments' IP ranges. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.