How to fix "[OData Source [56]] Error: Cannot acquire a managed connection from the run-time connection manager." error in SSIS?

How to fix "[OData Source [56]] Error: Cannot acquire a managed connection from the run-time connection manager." error in SSIS?

我在 运行 SSIS 从 SharePoint 列表中提取数据时遇到问题。 SSIS 包 运行 直到 2 周前都很好,突然包失败并出现此错误:

[OData Source [56]] Error: Cannot acquire a managed connection from the run-time connection manager. [SSIS.Pipeline] Error: OData Source failed validation and returned error code 0xC020801F. [SSIS.Pipeline] Error: One or more component failed validation. Error: There were errors during task validation

尝试过:

  1. 将包属性中的 64 位调试选项更改为 false
  2. http:// 而不是 https://

我希望 SSIS 程序包能够毫无问题地从 SharePoint 列表中提取数据,但最近遇到上述错误消息,并且可以正常工作一年多。

Server detail: Windows server 2012 R2.

Application details: Visual studio 2010, .NET framework - 4.5


更新@2019-02-17

我们没有使用 windows 身份验证,即使在 运行 SSDT 作为管理员之后,SSIS 通道仍然失败。我们能够在 ODATA 源中预览 Sharepoint 列表数据,但包在触发时失败并显示上述错误消息

更新 2 - ODATA 连接属性

在 ODATA 连接管理器中尝试设置以下属性,如图所示:


更新 1 - TLS 问题

在搜索时我发现了以下相关文章:

他们提到了以下解决方案:

We can resolve this using the below steps:

  1. Install Microsoft .NET 4.6 and above on your computer (https://technet.microsoft.com/en-us/library/security/2960358.aspx).
  2. Enforce TLS 1.2 on your machine through registry settings. In an elevated command prompt run the following commands:
    • reg add HKLM\SOFTWARE\Microsoft.NETFramework\v4.0.30319 /v SchUseStrongCrypto /t REG_DWORD /d 1 /reg:64
    • reg add HKLM\SOFTWARE\Microsoft.NETFramework\v4.0.30319 /v SchUseStrongCrypto /t REG_DWORD /d 1 /reg:32

也基于以下文章:

  • .NET 4.6 and above. You don’t need to do any additional work to support TLS 1.2, it’s supported by default.
  • .NET 4.5 TLS 1.2 is supported, but it’s not a default protocol. You need to opt-in to use it. The following code will make TLS 1.2 default, make sure to execute it before making a connection to secured resource: ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

类似问题linke

(我提到的link在这个问题中也有提到,也有很多有用的评论,这个问题很相关但不同的是他们没有连接到Sharepoint列表, 他们正在连接到 public 数据源)

  • OData Source Component in SSIS Not Connecting

原答案

正在尝试找出问题所在

根据您提供的信息,问题似乎不是由 SSIS 引起的,它与您的工作环境有关,或者可能与您用于访问 Sharepoint 列表的凭据有关。

在 ODATA 连接管理器中,there are many Authentication option you can use:

Authentication

Select one of the following options:

  • Windows Authentication. For anonymous access, select this option.
  • Basic Authentication
  • Microsoft Dynamics AX Online for Dynamics AX Online
  • Microsoft Dynamics CRM Online for Dynamics CRM Online
  • Microsoft Online Services for Microsoft Online Services

If you select an option other than Windows Authentication, enter the username and password.

如果您正在使用 Windows 身份验证,请再次尝试 run the Visual Studio as Administrator 和 运行 程序包,如果您正在使用其他身份验证类型,请检查该帐户是否仍然可以访问。

如果您使用 SQL 作业 运行 打包,还要检查用户是否具有从 Sharepoint 列表读取数据的必要权限。

有些帮助links

此外,我将提供一些有用的link关于如何使用 ODATA 源连接到 Sharepoint 列表的信息,它可能会给您一些见解:

由于在服务器中启用了代理,我们收到此错误。启用代理后,SSIS 包无法在执行期间访问 Sharepoint 列表。在 Internet 选项中将连接更改为 "automatically detect settings" 后,这工作正常。

此解决方案有所帮助,但该命令仍有问题。命令中缺少 \(在 Microsoft.NETFramework 之间)

reg add HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 /v SchUseStrongCrypto /t REG_DWORD /d 1 /reg:64

如果您使用代理,在 machine.config 中为 .NET Framework 设置它会有所帮助。

以管理员身份打开记事本并打开以下文件:

C:\Windows\Microsoft.NET\framework\v4.0.30319\config\machine.config

C:\Windows\Microsoft.NET\framework64\v4.0.30319\config\machine.config

搜索 如果未找到 ,请将以下文本添加为​​从上一端开始的第二行,并根据环境替换代理地址:

<system.net>
     <defaultProxy>
             <proxy autoDetect="false" bypassonlocal="true" proxyaddress="http://proxy_host:8080" />
     </defaultProxy>
</system.net>