Microsoft Fabric data connection to MongoDB

Hi,

We are using Microsoft Fabric with a data gateway to connect to our MongoDB (testbox) database, but we keep encountering certificate-related error messages, as shown below:

Connection to MongoDB server timed out.
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 : "Unspecified/vm-mongotest01:27017" }", EndPoint: "Unspecified/vm-mongotest01:27017", ReasonChanged: "Heartbeat", State: "Disconnected", ServerVersion: , TopologyVersion: , Type: "Unknown", HeartbeatException: "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.

We have tried various troubleshooting steps, including connecting using the server’s IP address and unlocking port 27017 on the server’s firewall. Microsoft Fabric can connect to the same test box gateway and access a SQL instance without any issues.

We have generated our own self-signed certificates and can connect locally on the test box using Compass with TLS/SSL and our PEM file. Additionally, local scripts connect without any problems. However, we are stuck with Fabric, and there appears to be very little documentation on this issue. For reference, the test server is running MongoDB 7.0.15.

We currently dont have a microsoft support partner so cannot log a ticket with them, apologies in advance for reaching out to this community.

Is someone able to assist?

Thanks, Lee