shlatchz
shlatchz

Reputation: 1652

Connecting to an azure Service Fabric App

I'm trying to debug why my Service Cluster App is stuck during the upgrade session. I've looked up how to do it with powershell and I found the command:

Get-ServiceFabricApplicationUpgrade fabric:/My.Fabric.App.Name

This command throws the error:

Get-ServiceFabricApplicationUpgrade : Cluster connection instance is null

So naturally, I tried connecting to the cluster with:

Connect-ServiceFabricCluster myfabric.westeurope.cloudapp.azure.com:19000

But I got:

WARNING: Failed to contact Naming Service. Attempting to contact Failover Manager Service... WARNING: Failed to contact Failover Manager Service, Attempting to contact FMM... False Connect-ServiceFabricCluster : One or more errors occurred. At line:1 char:1 + Connect-ServiceFabricCluster myfabric.westeurope.cloudapp.azure.com:19000 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Connect-ServiceFabricCluster], AggregateException + FullyQualifiedErrorId : CreateClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster

Service fabric is annoying.. Please help? :\

UPDATE

It's probably because my fabric is secured and I have a client cert that I have to use to connect.

I tried the following config for the command:

$connectArgs = @{  ConnectionEndpoint = 'myfabric.westeurope.cloudapp.azure.com:19000';  X509Credential = $True;  StoreLocation = 'CurrentUser';  StoreName = "MY";  ServerCommonName = "myfabric.westeurope.cloudapp.azure.com";  FindType = 'FindByThumbprint';  FindValue = "DEADBEEFDEADBEEFDEADBEEFDEADBEEF"; SkipChecks = $True  }

But Get-ServiceFabricApplicationUpgrade still doesn't work.

Upvotes: 1

Views: 1892

Answers (1)

shlatchz
shlatchz

Reputation: 1652

Success!

With the following arguments:

$connectArgs = @{  ConnectionEndpoint = 'myfabric.westeurope.cloudapp.azure.com:19000';  
                   X509Credential = $True;  
                   StoreLocation = "CurrentUser";  
                   StoreName = "My";  
                   ServerCommonName = "myfabric.westeurope.cloudapp.azure.com";  
                   FindType = 'FindByThumbprint';  
                   FindValue = "81EBFC23D456130C0CA99952484240EA2385F0C3"; 
                   ServerCertThumbprint = "DEADBEEFDEADBEEFDEADBEEFDEADBEEF" }

Connect-ServiceFabricCluster @connectArgs

Upvotes: 2

Related Questions