Forum Discussion
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
Noticed it is SSL Cert issue. All Sorted
10 Replies
- ati_puriResolver III
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
- AusSupportin70Frequent 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
- ati_puriResolver III
how about the Subnet IP whitelisting?
- AusSupportin70Frequent Visitor
"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)
- AusSupportin70Frequent Visitor
looks like need a public SSL?
- v-shchada-msftCommunity 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.
- v-shchada-msftCommunity Support
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. - v-shchada-msftCommunity Support
Hi AusSupportin70,
Just checking in to see if your issue has been resolved. Please let us know if you need any further assistance.
Thank you.
- AusSupportin70Frequent Visitor
Noticed it is SSL Cert issue. All Sorted