How to connect to the Self hosted mongoDB from Fabric.

Rajuvardhana K V 60 Reputation points
2026-01-27T10:10:09.3333333+00:00

I tried to integrate the self hosted MongoDB to fabric but im getting the error

Connection to MongoDB server is timeout.

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", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "10.6.0.6:27017" }", EndPoint: "10.6.0.6:27017", ReasonChanged: "Heartbeat", State: "Disconnected", ServerVersion: , TopologyVersion: , Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)

   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)

   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)

   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest, Boolean renegotiation)

   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)

   at MongoDB.Driver.Core.Connections.SslStreamFactory.CreateStream(EndPoint endPoint, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelper(CancellationToken cancellationToken)

   --- End of inner exception stack trace ---

   at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelper(CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Connections.BinaryConnection.Open(CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Servers.ServerMonitor.InitializeConnection(CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Servers.ServerMonitor.Heartbeat(CancellationToken cancellationToken)", LastHeartbeatTimestamp: "2026-01-09T06:40:09.7412433Z", LastUpdateTimestamp: "2026-01-09T06:40:09.7412433Z" }] }.

 

Activity ID: 05b51939-ba6c-471e-8a17-0b541569b176"

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2026-01-27T10:10:23.8033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To connect to a self-hosted MongoDB from Microsoft Fabric, you need to ensure that several conditions are met to avoid timeout errors like the one you are experiencing. Here are some troubleshooting steps you can follow:

    1. Network Configuration: Ensure that the network settings allow connections from Microsoft Fabric to your self-hosted MongoDB. This includes checking firewalls and network ACLs to ensure that the required ports (default is 27017 for MongoDB) are open.
    2. Connection String: Verify that your connection string is correctly formatted and points to the correct IP address and port of your MongoDB instance. For example, it should look something like mongodb://username:password@10.6.0.6:27017.
    3. Authentication: Make sure that the MongoDB user you are using has the necessary permissions and that the credentials are correct. The user should have at least read access to the database.
    4. SSL/TLS Configuration: If your MongoDB instance requires SSL/TLS, ensure that your connection settings in Fabric are configured to use SSL. If SSL is not required, ensure that the connection string does not specify SSL options.
    5. Timeout Settings: You may want to increase the timeout settings in your connection configuration if the server is slow to respond.
    6. MongoDB Logs: Check the MongoDB server logs for any errors or warnings that might indicate why the connection is being refused or timing out.

    If you continue to experience issues, consider testing the connection from another client (like MongoDB Compass or a simple script) to isolate whether the problem is with the Fabric connection or the MongoDB server itself.


    References:

    0 comments No comments

  2. Manoj Kumar Boyini 6,270 Reputation points Microsoft External Staff Moderator
    2026-01-27T14:23:28.1966667+00:00

    Hi Rajuvardhana K V

    Kindly share this query in the Microsoft Fabric Community, where the Fabric product team and community experts can help you further:
    https://community.fabric.microsoft.com/

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.