1
votes

I have setup a release pipeline in Azure DevOps for our Service Fabric cluster. However it is having issue connecting to the cluster during the deploy task.

I have tried different authentication options and received different errors:

  1. Certificate Based

    I tried both https and tcp protocol for Cluster Endpoint. I put the server certificate thumbprint in both server and client certificate field, with the correct password. The error I received was:

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.

The port 19000 is definitely open on the public load balancer.

  1. Azure Active Directory credential

    I tried both protocols with server certificate thumbprint and my Azure account username and password:

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.AsyncCallOutAdapter21.Finish(IFabricAsyncOperationContext context, Boolean expectedCompletedSynchronously) --- End of inner exception stack trace ---<---

I can deploy without any issues from Visual Studio 2017. Does anyone know whats going on here?

1

1 Answers

1
votes

My client certificate was wrong. Use powershell to get the correct base 64 string:

[System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes("certificate.pfx"))