Azure Devops 无法连接到 Service Fabric 集群
Azure Devops cannot connect to Service Fabric Cluster
我已经在 Azure DevOps 中为我们的 Service Fabric 集群设置了一个发布管道。但是在部署任务期间连接到集群时出现问题。
我尝试了不同的身份验证选项并收到了不同的错误:
基于证书
我为集群端点尝试了 https 和 tcp 协议。我将服务器证书指纹放在服务器和客户端证书字段中,并使用正确的密码。我收到的错误是:
An error occurred attempting to import the certificate. Ensure that your service endpoint is configured properly with a correct certificate value and, if the certificate is password-protected, a valid password. Error message: Exception calling "Import" with "3" argument(s): "Cannot find the requested object.
端口 19000 在 public 负载均衡器上肯定是打开的。
Azure Active Directory 凭据
我尝试了使用服务器证书指纹和我的 Azure 帐户用户名和密码的两种协议:
System.AggregateException: One or more errors occurred. ---> System.Fabric.FabricTransientException: Could not ping any of the provided Service Fabric gateway endpoints. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80071C49
at System.Fabric.Interop.NativeClient.IFabricPropertyManagementClient2.EndNameExists(IFabricAsyncOperationContext context)
at System.Fabric.FabricClient.PropertyManagementClient.NameExistsEndWrapper(IFabricAsyncOperationContext context)
at System.Fabric.Interop.AsyncCallOutAdapter21.Finish(IFabricAsyncOperationContext context, Boolean expectedCompletedSynchronously)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Microsoft.ServiceFabric.Powershell.ClusterConnection.InitializeClaimsMetadata(TimeSpan timeout)
at Microsoft.ServiceFabric.Powershell.ConnectCluster.ProcessRecord()
---> (Inner Exception #0) System.Fabric.FabricTransientException: Could not ping any of the provided Service Fabric gateway endpoints. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80071C49
at System.Fabric.Interop.NativeClient.IFabricPropertyManagementClient2.EndNameExists(IFabricAsyncOperationContext context)
at System.Fabric.FabricClient.PropertyManagementClient.NameExistsEndWrapper(IFabricAsyncOperationContext context)
at System.Fabric.Interop.AsyncCallOutAdapter2
1.Finish(IFabricAsyncOperationContext context, Boolean expectedCompletedSynchronously)
--- End of inner exception stack trace ---<---
我可以毫无问题地部署 Visual Studio 2017 年。有人知道这里发生了什么吗?
我的客户端证书有误。使用 powershell 获取正确的 base 64 字符串:
[System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes("certificate.pfx"))
我已经在 Azure DevOps 中为我们的 Service Fabric 集群设置了一个发布管道。但是在部署任务期间连接到集群时出现问题。
我尝试了不同的身份验证选项并收到了不同的错误:
基于证书
我为集群端点尝试了 https 和 tcp 协议。我将服务器证书指纹放在服务器和客户端证书字段中,并使用正确的密码。我收到的错误是:
An error occurred attempting to import the certificate. Ensure that your service endpoint is configured properly with a correct certificate value and, if the certificate is password-protected, a valid password. Error message: Exception calling "Import" with "3" argument(s): "Cannot find the requested object.
端口 19000 在 public 负载均衡器上肯定是打开的。
Azure Active Directory 凭据
我尝试了使用服务器证书指纹和我的 Azure 帐户用户名和密码的两种协议:
System.AggregateException: One or more errors occurred. ---> System.Fabric.FabricTransientException: Could not ping any of the provided Service Fabric gateway endpoints. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80071C49 at System.Fabric.Interop.NativeClient.IFabricPropertyManagementClient2.EndNameExists(IFabricAsyncOperationContext context) at System.Fabric.FabricClient.PropertyManagementClient.NameExistsEndWrapper(IFabricAsyncOperationContext context) at System.Fabric.Interop.AsyncCallOutAdapter2
1.Finish(IFabricAsyncOperationContext context, Boolean expectedCompletedSynchronously) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at Microsoft.ServiceFabric.Powershell.ClusterConnection.InitializeClaimsMetadata(TimeSpan timeout) at Microsoft.ServiceFabric.Powershell.ConnectCluster.ProcessRecord() ---> (Inner Exception #0) System.Fabric.FabricTransientException: Could not ping any of the provided Service Fabric gateway endpoints. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80071C49 at System.Fabric.Interop.NativeClient.IFabricPropertyManagementClient2.EndNameExists(IFabricAsyncOperationContext context) at System.Fabric.FabricClient.PropertyManagementClient.NameExistsEndWrapper(IFabricAsyncOperationContext context) at System.Fabric.Interop.AsyncCallOutAdapter2
1.Finish(IFabricAsyncOperationContext context, Boolean expectedCompletedSynchronously) --- End of inner exception stack trace ---<---
我可以毫无问题地部署 Visual Studio 2017 年。有人知道这里发生了什么吗?
我的客户端证书有误。使用 powershell 获取正确的 base 64 字符串:
[System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes("certificate.pfx"))