[在运行以前可以使用的TFS Mac Build Agent时如何解决'Crypto'异常?]

问题描述 投票:1回答:1
Mac主机上的TFS构建代理一直有效,直到我最近升级Visual Studio并使用自制软件安装了PowerShell 6.2.3。 Visual Studio Enterprise的版本现在为8.4(内部版本2535)。

根据Visual Studio升级要求,在我重新启动Mac主机之前,构建代理正在运行。我第一次尝试在命令行上使用. run.sh再次启动代理时,该代理不再起作用。我们试图在另一台Mac主机上安装具有最新版本的新代理,并且遇到类似问题。有重大变化吗?

我尝试修复openssl,如以下链接中所建议:https://github.com/microsoft/azure-pipelines-agent/issues/232

https://social.msdn.microsoft.com/Forums/vstudio/en-US/f2f61f67-156e-4163-8cd3-ad882b7bc26d/config-build-agent-faile-on-macsystemtypeinitializationexception-the-type-initializer-for?forum=tfsbuild

我已使用brew cask uninstall powershell删除了Powershell

完成所有这些步骤后,代理仍将无法启动。

我在构建代理的_diag目录中找到了日志。似乎在加载RSA命令时发生了异常:

[2020-01-09 01:01:15Z INFO CredentialManager]创建类型OAuth[2020-01-09 01:01:15Z INFO CredentialManager]创建凭证类型:OAuth

[2020-01-09 01:01:15Z信息RSAFileKeyManager]从文件加载RSA密钥参数/Users/Shared/tfsbuildagent/.credentials_rsaparams [2020-01-0901:01:15Z ERR Terminal] WRITE ERROR:发生错误:类型'Crypto'的初始值设定项引发了异常。

[2020-01-09 01:01:15ZERR AgentProcess] System.TypeInitializationException:类型“加密”的初始值设定项引发了异常。 ->System.TypeInitializationException:类型的初始值设定项“ CryptoInitializer”引发了异常。 ->System.DllNotFoundException:无法加载DLL'System.Security.Cryptography.Native.OpenSsl':指定的模块找不到。 (HRESULT的异常:0x8007007E)在Interop.CryptoInitializer.EnsureOpenSslInitialized()在Interop.CryptoInitializer..cctor()-内部异常堆栈的结尾跟踪---位于Interop.CryptoInitializer.Initialize()Interop.Crypto..cctor()-内部异常堆栈跟踪的结尾-在Interop.Crypto.RsaCreate()在System.Security.Cryptography.RSAImplementation.RSAOpenSsl.ImportParameters(RSAParameters参数)Microsoft.VisualStudio.Services.Agent.Listener.Configuration.RSAFileKeyManager.GetKey()在Microsoft.VisualStudio.Services.WebApi.VssSigningCredentials.Create(Func`1工厂)Microsoft.VisualStudio.Services.Agent.Listener.Configuration.OAuthCredential.GetVssCredentials(IHostContext上下文)Microsoft.VisualStudio.Services.Agent.Listener.MessageListener.d__11.MoveNext()---从上一个引发异常的位置开始的堆栈跟踪-System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)Microsoft.VisualStudio.Services.Agent.Listener.Agent.d__8.MoveNext()---从上一个引发异常的位置开始的堆栈跟踪-System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)Microsoft.VisualStudio.Services.Agent.Listener.Agent.d__5.MoveNext()---从上一个引发异常的位置开始的堆栈跟踪-System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)Microsoft.VisualStudio.Services.Agent.Listener.Program.d__1.MoveNext()
Mac主机上的TFS构建代理一直有效,直到最近我升级了Visual Studio并使用自制软件安装了PowerShell 6.2.3。现在,Visual Studio Enterprise的版本为8.4(内部版本2535)。 ...
macos xamarin .net-core tfs msbuild
1个回答
0
投票
我们的本地TFS没有用于OSX的最新代理二进制文件,该二进制文件使用Mac中最新的安全性,而不使用OpenSSL。新的二进制文件位于github。因此,我从那里下载而不是从TFS服务器下载。
© www.soinside.com 2019 - 2024. All rights reserved.