Forum Discussion

alfBI's avatar
alfBI
Responsive Resident
7 months ago
Solved

Troubleshooting Connection Issues with Mongo DB using VNET Data Gateway


Troubleshooting Connection Issues with Mongo DB using VNET Data Gateway

Hi,

 

We are trying to ingest data from a Mongo DB placed on an Azure Kubernetes container onto our Fabric Lakehouse. For that purpose we have created a VNET  Data Gateway following steps described on MS doc

 

Create virtual network (VNet) data gateways | Microsoft Learn

 

Create virtual network (VNet) data gateways | Microsoft Learn

After that steps we have created the connection

 

 


 When we test connection following error does appear (IP adress has been masked)

 

 


EndPoint: "XX.XXX.XX.XX: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.

 

On the Mongo DB side following logs is shown

 

ongodb-0 mongodb {"t":{"$date":"2026-01-22T09:10:36.211+00:00"},"s":"I", "c":"EXECUTOR", "id":22988,
"ctx":"conn331060","msg":"Error receiving request from client. Ending connection from remote","attr":
{"error":{"code":141,"codeName":"SSLHandshakeFailed","errmsg":"SSL handshake received but server is started without SSL support"},"remote":"XX.XXX.XX.XXX:19754","connectionId":331060}}

 

It is clear that there is some issue related with the authentication/SSL but no idea hwo to handle that. Any idea about how to manage that issue?

 

 

Regards,

  • Hi alfBI , Thank you for reaching out to the Microsoft Community Forum.

     

    From your errors, Fabric is able to reach your MongoDB (the connection arrives at MongoDB), but it is trying to open a TLS/SSL connection, while your MongoDB server is running without SSL enabled. MongoDB therefore closes the connection immediately during the handshake, before any authentication happens.

     

    This is not a firewall, DNS or credential problem. The failure happens at the transport layer, not at the login layer. Fabric’s VNET Data Gateway always uses secure (TLS) connections for MongoDB and does not support plain TCP connections. There is no setting in Fabric to disable SSL.

     

    You must either enable TLS on MongoDB or place MongoDB behind a TLS-terminating proxy. If MongoDB remains non-TLS, Fabric will never be able to connect.

  • alfBI's avatar
    alfBI
    7 months ago

    Good question, unfortunately it is not possible to execute this command from the Fabric VNet. Anyway we have checked that the problem comes from the fact that Mongo DB did not have TLS enabled (Fabric requires TLS 1.2)

5 Replies

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi alfBI , Thank you for reaching out to the Microsoft Community Forum.

     

    From your errors, Fabric is able to reach your MongoDB (the connection arrives at MongoDB), but it is trying to open a TLS/SSL connection, while your MongoDB server is running without SSL enabled. MongoDB therefore closes the connection immediately during the handshake, before any authentication happens.

     

    This is not a firewall, DNS or credential problem. The failure happens at the transport layer, not at the login layer. Fabric’s VNET Data Gateway always uses secure (TLS) connections for MongoDB and does not support plain TCP connections. There is no setting in Fabric to disable SSL.

     

    You must either enable TLS on MongoDB or place MongoDB behind a TLS-terminating proxy. If MongoDB remains non-TLS, Fabric will never be able to connect.

  • Hello alfBI have you checked your gateway server has network access to the Mongo DB port? Try running this over Powershell

     

    Test-NetConnection <mongodb-dns-or-ip> -Port 27017

     

    • alfBI's avatar
      alfBI
      Responsive Resident

      Good question, unfortunately it is not possible to execute this command from the Fabric VNet. Anyway we have checked that the problem comes from the fact that Mongo DB did not have TLS enabled (Fabric requires TLS 1.2)

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi alfBI , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi alfBI , Hope you're doing okay! May we know if it worked for you, or are you still experiencing difficulties? Let us know — your feedback can really help others in the same situation.