Service Fabric Deployments

I am getting these errors from octopus deployments at Service Fabric Projects.

I have even added this script but there is no change
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser

The Error
WARNING: http://xxx.westeurope.cloudapp.azure.com:19000/
July 6th 2017 13:56:21Info
Attempt 4 of 5 failed: No cluster endpoint is reachable, please check if there is connectivity/firewall/DNS issue.
July 6th 2017 13:56:21Info
Waiting for 5 seconds before retrying…
July 6th 2017 13:56:26Info
Retrying…
July 6th 2017 13:56:26Info
WARNING: Failed to contact Naming Service. Attempting to contact Failover
July 6th 2017 13:56:26Info
Manager Service…
July 6th 2017 13:56:26Info
WARNING: Failed to contact Failover Manager Service, Attempting to contact
July 6th 2017 13:56:26Info
FMM…
July 6th 2017 13:56:26Info
WARNING: http://xxx.westeurope.cloudapp.azure.com:19000/
July 6th 2017 13:56:26Error
Connect-ServiceFabricCluster : No cluster endpoint is reachable, please check
July 6th 2017 13:56:26Error
if there is connectivity/firewall/DNS issue.
July 6th 2017 13:56:26Error
At C:\Octopus\Work\20170706135601-1668-19\staging\Octopus.AzureServiceFabricCon
July 6th 2017 13:56:26Error
text.ps1:210 char:16
July 6th 2017 13:56:26Error

  • … [void](Connect-ServiceFabricCluster @ClusterConnectionParameters
    July 6th 2017 13:56:26Error
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

July 6th 2017 13:56:26Error
+ CategoryInfo : InvalidOperation: (:slight_smile: [Connect-ServiceFabricClus
July 6th 2017 13:56:26Error
ter], FabricException
July 6th 2017 13:56:26Error
+ FullyQualifiedErrorId : TestClusterConnectionErrorId,Microsoft.ServiceFa
July 6th 2017 13:56:26Error
bric.Powershell.ConnectCluster
July 6th 2017 13:56:26Error
July 6th 2017 13:56:26Error
Script ‘C:\Octopus\Work\20170706135601-1668-19\staging\DeployToServiceFabric.ps1’ returned non-zero exit code: 1
July 6th 2017 13:56:26Error
Running rollback conventions…

When I use the command prompt at the octopus server I get this

Error I am getting is the one from the powershell

PS C:\Users\octoadmin> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser
PS C:\Users\octoadmin> Connect-serviceFabricCluster
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 : Could not ping any of the provided Service Fabric gateway endpoints.
At line:1 char:1

  • Connect-serviceFabricCluster
  •   + CategoryInfo          : InvalidOperation: (:) [Connect-ServiceFabricCluster], FabricTransientException
      + FullyQualifiedErrorId : TestClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster

from the octopus I could access to http://xxx.cloudapp.azure.com:19080/Explorer/index.html#/

But I can not access via powershell in Admin mode

Hi,

Thanks for getting in touch.

The error message indicates that this may be a firewall issue. Do you have port 19000 open on the Octopus server’s firewall?

Also, what security mode do you have your cluster set to? Unsecure or Secure with certificates or AAD?

Cheers
Mark

I am having the same issue.Have added inbound and outbound rules but still the sme problem.Using secure with certificates and certificate installed on octopus server.Can you suggest what should be the work around for this issue.

Hi Subash,

Thanks for getting in touch and sorry you’re having issues connecting to SF.

Could you please confirm if you can deploy to your SF cluster from Visual Studio? If that works but your Octopus Server is unable to make a connection via a PowerShell admin prompt, you could try connecting with some additional arguments in PowerShell, as mentioned on this StackOverflow answer, which corresponds to the solution mentioned in this Microsoft blog.

But firstly we’d recommend you confirm whether you can deploy to your SF cluster with Visual Studio manually, because if you can’t do that, then there’s most likely a problem with your SF cluster on Azure and you may need to re-create it.

Hope this helps
Mark

Hi Mark,
I am able to deploy to the same service fabric cluster from a different octopus server which is on azure cloud.The problem i facing is with a octopus server which resides behind a proxy.
Can you suggest how to connect to the cluster from octopus server which is behind proxy.

Hi Subash,

You will need to have your firewall configured correctly before your Octopus Server can communicate with the Azure SF cluster.

Regarding your proxy, if you’re able to connect to the cluster from a cloud-based Octopus Server, but not from the Octopus Server that’s behind a proxy, you will need to consult with your SysAdmin to discuss your particular proxy configuration and they may be able to help analyse why that server’s not able to communicate with SF.

Which particular proxy server are you using?

Cheers
Mark

Hi Mark,
We are using an internal proxy server.Is there any way we can implement reverse proxy to tackle this issue.
We have white listed the port and Ip of the cluster to allow the connection but still it is not able to connect.I assume the proxy thing only works in tentacles not in cloud areas as we have already added the proxy server in octopus .
Please suggest the workaround.

Thanks,
Subash

Hi Subash,

We had a similar issue and our solution ended up being we needed to use the fully qualified name of the connection endpoint.

Is there any documentation or example for this so that i can go through it and try to implement the same.

Hi Subash,

Unfortunately we do not have any documentation or examples of connecting to Service Fabric from behind a proxy.

We recommend you start with the basics and confirm that you can deploy to your Service Fabric cluster manually from Visual Studio (from a machine outside of the Azure cloud). Once you know you can do this, then you can start troubleshooting with your SysAdmin about deploying from Octopus and your particular proxy configuration. Azure support forums may be able to advice on reverse proxy setups with Service Fabric clusters. There is some Microsoft documentation here that may help.

Cheers
Mark