Fixing Bad Address Errors Setting up Azure Service Fabric

I am going to be doing some work with the Azure Service Fabric Preview and so today I went and installed and configured a local cluster so I can get to working with it. The directions for the installation is pretty simple but I came across an error that confused me for a while. I found the solution and wanted to share it. Here’s what I did below.

First step is navigating to the Service Fabric Docs on Azure.com and following the directions to install the Service Fabric bits and SDK locally.

Second is run the PS script that sets up the local cluster environment. It was here I ran into some issues following the directions as written. in Powershell I saw some weird errors talking about paths. I launched the Service Fabric Explorer and when I clicked on a Node I got this error.SFPathError

I went an opened the cluster setup script in the PS editor and started looking around. It looks like this below. Notice the first three parameters in this script. This sets the path where the local cluster is configured on your machine.

SF-DevClusterSetupScript

Now normally, when this script runs (and you just leave it to its defaults), it creates this directory, C:\SfDevCluster. It then creates /Data and /Log directories underneath this and some other stuff too.

Looking back in Windows Explorer I see that C:\SfDevCluster was created just fine and there was also a \Manifest directory. However the script also wants to create a \Data and \Log directory and these had not been created. This explained the error I was seeing. Of course it would complain about a bad address. The address was actually a path that didn’t yet exist.

The fix? (or at least a fix that fixed it for me) I just entered the paths into those first three variables that the script wanted to use by default anyway. So after I edited the PS script this is what it looked like. See the paths?

SF-DevClusterSetupScriptFix

 

I then saved and executed the script and VOILA! it worked.

SFSuccess

 

If you’re trying to get the Service Fabric local cluster setup and you’re running into issues. Give this a try (make sure you run the CleanCluster.ps first) and hopefully it will get you up and running building Azure Service Fabric applications.

Facebooktwittergoogle_plusmailFacebooktwittergoogle_plusmail