[MongoDB] Connecting to MongoDB Atlas
Question
Forge component by Barduino

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.



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...


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.


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

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

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

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

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