Copy Data From MongoDb -> SQL Azure fails

Manvel 11 Reputation points
2020-08-06T14:42:15.107+00:00

I'm creating a copy activity to copy data from Mongo DB to Azure SQL Database.
When I setup MongoDB dataset, Test connection succeeds, Preview Data shows the actual data.
However, when I run the activity itself, it fails with the error:

"Failure happened on 'Source' side. ErrorCode=MongoDbConnectionTimeout,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=>Connection to MongoDB server is timeout.,Source=Microsoft.DataTransfer.Runtime.MongoDbV2Connector,''Type=System.TimeoutException,Message=A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{ ReadPreference = { Mode : PrimaryPreferred } }, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : \"1\", ConnectionMode : \"ReplicaSet\", Type : \"ReplicaSet\", State : \"Disconnected\", Servers : [{ ServerId: \"{ ClusterId : 1, EndPoint : \"Unspecified/shard-details\" }\", EndPoint: \"Unspecified/shard-details\", State: \"Disconnected\", Type: \"Unknown\", HeartbeatException: \"System.InvalidOperationException: Invalid BinaryConnection state transition from 4 to Failed.

I understand what the error is, but why it successfully connects & previews data when testing dataset itself, however fails when executed as part of the activity ?

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

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,422 Reputation points Microsoft Employee
    2020-08-15T05:51:34.757+00:00

    Hi @chodkows , @Manvel ,

    Sorry you are experiencing this.

    After having coversation with internal team, there has been a bug identified by ADF engineering team related to this. To workaround this issue, could you please manually check the linked service json payload, to see if there is a property of "tls=true" inside the connection string.

    Change the "tls=true" to "ssl=true" in connection string and rerun failed pipelines. The fix for this issue is currently under deployment, until the fix go live, unfortunately current linked services need this manual effort to correct it.

    17821-image.png

    In case if you have already provided "ssl=true" while creating the linked service, after test connection and preview data, before running the pipeline, please open the linked service code to double check, this "ssl=true" property maybe auto-changed to "tls=true", if so, please change it back to "ssl=true"

    Please let us know how it goes. In case if this workaround doesn't resolve your issue, please share details as requested by Himanshu so that we can escalate this to internal team for deeper analysis.

    Thank you for your patience.