Create linked service to MongoDB Connection Failed

qing 1 Reputation point
2021-11-02T09:22:21.02+00:00

I have a SelfHostIR in VM.
I can access MongoDB from the VM.
I created a linked service to MongoDB using SelfHostIR.
The connection test is always failed.

Error code
23404
Details

Connection to MongoDB server is timeout. A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "Automatic", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/host:port" }", EndPoint: "Unspecified/host:port", State: "Disconnected", 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. at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MongoDB.Driver.Core.Connections.SslStreamFactory.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,600 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,422 Reputation points Microsoft Employee
    2021-11-03T01:09:42.67+00:00

    Thanks for the update @qing .

    As per official ADF connector documentation , the ADF MongoDB connector supports versions up to 4.2 and I see that your version is 4.4.6, which could you be the reason you are receiving this issue.

    145838-image.png

    Ref doc: Copy data from or to MongoDB using Azure Data Factory or Synapse Analytics

    Also if your Mongo DB needs a certificate to validate, then as per internal team confirmation, the current ADF connector don’t support the connections requiring the certificates at this point. This is a product limitation.

    If this is the case I would recommend you to please log a feedback in Azure Data Factory IDEAS forum - https://feedback.azure.com/d365community/forum/1219ec2d-6c26-ec11-b6e6-000d3a4f032c. All the feedback shared in this forum are actively monitored and reviewed by ADF Product team. Also please do share your feedback thread link once it is posted so that other with similar feedback can upvote and comment on it.

    Hope this info helps.

    ----------

    • Please don't forget to click on 130616-image.png and upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators