Forum Discussion

AusSupportin70's avatar
AusSupportin70
Frequent Visitor
2 months ago
Solved

Connection Issues with Mongo DB using Fabric VNET Data Gateway

Getting the above error when trying to connect. MondoBD TLS Mode set to RequireTLS.  but we have set to allowconnectionwithoutcertificate:true port:27017 bindip:0.0.0.0  

10 Replies

  • Hi AusSupportin70 ,

     

    The VNT gateway uses dynamic IPs from a delegated subnet, did you check if entire subnet needs to be whitelisted? Can you also delpy test VM on the same subnet and try connecting to MongoDB? is there any firewall rules blocking the connection.

     

    Let me know if you have tested the above.

     

    Thanks

    Ati Puri

    • AusSupportin70's avatar
      AusSupportin70
      Frequent Visitor

      Can you also delpy test VM on the same subnet and try connecting to MongoDB?  No we cannot associate anything to this subnet.

      I can ping the ModoDb server and Port via the Test VM in fabric Vnet 

  • "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)

    • v-shchada-msft's avatar
      v-shchada-msft
      Community Support

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

      At this point, the issue appears more likely related to the TLS/SSL handshake between the Fabric VNET gateway and MongoDB. Even with allowConnectionsWithoutCertificates:true, TLS negotiation must still succeed because MongoDB is configured with RequireTLS.

       

      Could you test the connection from the VM using mongosh with TLS enabled and verify whether the MongoDB server is using a self-signed certificate or a certificate whose CN/SAN does not match the server name? It would also help to review the MongoDB logs for any TLS/SSL handshake failures or rejected connections during the Fabric connection attempt.

      I hope this information helps. Please do let us know if you have any further queries.

      Regards.




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

    Just checking in, were you able to resolve the issue? If not please feel free to share an update and we will be happy to assist further.
    Your feedback will also help others facing similar challenges.

    Thank you.