0
votes

I installed a local cluster to my development machine today to have a play. However when uploading some guest exe's the fabric crashes. I even tested just loading simple old notepad.exe, but alas the same crash. As a further test I pushed the notepad.exe to the public party cluster and it ran just fine. This post gives a similar error, and as per the comments I suspect it is a Windows 7 issue.

So next idea was to install a local cluster on a new Windows server VM, and attempt to publish to that. But I've hit another wall there too. I can connect to the "remote" cluster's web management interface, and I can see all of the Fabric processes running and listening on port 19000, but VS 2015 refuses to connect during a publish. I disabled the firewall thinking that was the issue, and have "pinged" various ports to verify. Some respond (such as 19080) but not 19000.

Ideas ?

Update: Running powershell connect command on the remote machine works.

Update2: I've installed the "local cluster" onto 3 other machines and all do exactly the same thing

Update3: Created a port forward on the remote machine using the netsh command to route from 18090 to 19000. Now I can connect via powershell from my local machine to the remote machine's local cluster. (I also noticed that the username/password on the remote machine needs to be the same if they are not on the same domain) Visual Studio can also now connect, but the powershell script Errors mid way, here is the output.

*>Copying application to image store... Copy application package succeeded Registering application type... Register-ServiceFabricApplicationType : The Application Manifest file 'FabricApp2Type\ApplicationManifest.xml' is not found in the store. At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricS DK\Publish-NewServiceFabricApplication.ps1:244 char:9 + Register-ServiceFabricApplicationType -ApplicationPathInImageStore $appl ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ + CategoryInfo : ResourceUnavailable: (Microsoft.Servi...usterCon nection:ClusterConnection) [Register-ServiceFabricApplicationType], FileNo
tFoundException + FullyQualifiedErrorId : RegisterApplicationTypeErrorId,Microsoft.Service Fabric.Powershell.RegisterApplicationType

Finished executing script 'Deploy-FabricApplication.ps1'.*

I've now resorted to installing a local copy of visual studio on the remote machine and using that to run my tests since my Windows 7 machine wont.

Whilst my efforts to now are to get around the Win 7 bug, I can see benefit in having "local clusters" on other machines for development and debugging. Is a lot easier than having to stand up a dev cluster in Azure, and more secure than pushing to the public Party cluster. I hope someone in the SF team is already working on allowing VS to remotely deploy and debug.

If anyone has suggestions as to how to remedy the issues so far, please post. I'm happy test ideas too.

3
Can you share your custom publish profile, that you added to VS2015jimpaine
All I did was add a ConnectionEndpoint="myserver:19000" to the existing publish profile.If I change myserver to localhost then publishing locally works just fine.OrdinaryOrange

3 Answers

1
votes

I have several small one machine development clusters hosted in DevTest labs, and they work well.

I think the key difference is that I am using the Service Fabric Standalone installer as opposed to the SDK. I tried to get the SDK version to work, with the same results you found.

These are the instructions I distribute internally to create a one machine 'micro cluster' in DevTest lab.

  1. Download the Service Fabric standalone package from the Azure site
    and Unzip https://azure.microsoft.com/en-us/documentation/articles/service-fabric-cluster-creation-for-windows-server/
  2. Edit File ClusterConfig.Unsecure.DevCluster
  3. Update the 3 ip address entries with the IP address or host name of the local machine ex - "iPAddress": "10.0.0.5"
  4. Create the Cluster with PowerShell Command (use admin) .\CreateServiceFabricCluster.ps1 -ClusterConfigFilePath
    .\ClusterConfig.Unsecure.DevCluster.json -AcceptEULA
  5. Verify Cluster creation complete by opening browser - http://hostname:19080
  6. Open Publish port on local machine (and endpoint firewall if using normal ARM machine instead of dev-test)
1
votes

We ran into the same issues with Windows 7 and a guest executable. Running in Azure or on Windows 10 worked fine. We ended up wrapping the guest executable in a stateless service which allowed us to run and debug locally on Windows 7. This ended up being a better solution overall as well since, at the time, guest executables had several limitations vs a stateless service.

0
votes

Creation of local cluster using SDK is for one box development only, you cannot publish applications to it remotely. For creating remote local clusters, please use the standalone package( as suggested by Chuck Duffy )