Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,972 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When we try to connect to the cosmos mongo DB “monitoring-cosmos-ensight” form inside the function utilizing the system managed identity we get:
[Error] Error when reading device shellypro3em-c8f09e87a5a4 : A timeout occurred after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 }, OperationsCountServerSelector }. Client view of cluster state is { ClusterId : '1', ConnectionMode : 'ReplicaSet', Type : 'ReplicaSet', State : 'Disconnected', Servers : [{ ServerId: '{ ClusterId : 1, EndPoint : 'Unspecified/monitoring-cosmos-ensight.mongo.cosmos.azure.com:10255' }', EndPoint: 'Unspecified/monitoring-cosmos-ensight.mongo.cosmos.azure.com:10255', ReasonChanged: 'Heartbeat', State: 'Disconnected', ServerVersion: , TopologyVersion: , Type: 'Unknown', HeartbeatException: 'MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server.
--- MongoDB.Driver.MongoConnectionException: An exception occurred while receiving a message from the server.
--- System.IO.EndOfStreamException: Attempted to read past the end of the stream.
at MongoDB.Driver.Core.Misc.StreamExtensionMethods.ReadBytes(Stream stream, Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.BinaryConnection.ReceiveBuffer(CancellationToken cancellationToken)