[MongoDB] Connecting to MongoDB Atlas

[MongoDB] Connecting to MongoDB Atlas

  
Forge Component
(7)
Published on 2017-02-24 by Barduino
7 votes
Published on 2017-02-24 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...