Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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"
Solved! Go to Solution.
Hi @Rajuvardhana ,
You are already following the correct Microsoft documentation for connecting a self-hosted MongoDB to Microsoft Fabric using a Copy Job. That document accurately describes the supported setup and prerequisites.
Based on this guidance, Microsoft Fabric requires secure (TLS/SSL) connectivity when accessing MongoDB through the On-premises Data Gateway. In your current setup, TLS is not enabled on the MongoDB server, which causes the connection handshake to fail and results in the timeout error you are seeing.
To successfully connect, TLS must be enabled on the MongoDB server, a certificate must be configured (a self-signed certificate is acceptable), and the certificate must be trusted on the gateway machine. After this, the MongoDB connection should be configured with SSL enabled in the Fabric Copy Job.
Without enabling TLS on MongoDB, Fabric will not be able to establish a connection, even if the gateway is correctly installed and running.
Best Regards,
Community Support Team
Yes, We have installed the gateway and TLS is not enabled on the Server.
Guide me to connect Self hosted MongoDB to fabric, we are using Copy Job in Fabric.
https://learn.microsoft.com/en-us/fabric/data-factory/connector-mongodb-copy-activity
Hi @Rajuvardhana ,
You are already following the correct Microsoft documentation for connecting a self-hosted MongoDB to Microsoft Fabric using a Copy Job. That document accurately describes the supported setup and prerequisites.
Based on this guidance, Microsoft Fabric requires secure (TLS/SSL) connectivity when accessing MongoDB through the On-premises Data Gateway. In your current setup, TLS is not enabled on the MongoDB server, which causes the connection handshake to fail and results in the timeout error you are seeing.
To successfully connect, TLS must be enabled on the MongoDB server, a certificate must be configured (a self-signed certificate is acceptable), and the certificate must be trusted on the gateway machine. After this, the MongoDB connection should be configured with SSL enabled in the Fabric Copy Job.
Without enabling TLS on MongoDB, Fabric will not be able to establish a connection, even if the gateway is correctly installed and running.
Best Regards,
Community Support Team
Hi @Rajuvardhana ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you .
Best Regards,
Community Support Team
Fabric can’t connect directly to a self‑hosted MongoDB if you don't have an On‑premises Data Gateway.
The error you’re seeing is usually a certificate issue:
Check:
Once gateway + TLS are correct, the connection should work.
If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution !
Hi @Rajuvardhana ,
Thanks for reaching out to the Microsoft fabric community forum.
I would also take a moment to thank @valentinbauer , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you .
Best Regards,
Community Support Team
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 22 | |
| 14 | |
| 12 | |
| 11 |