Update 2017-07-19:
While setting up another ASF-Cluster On-Premise I encountered the same issues again. ("The
first Fabric upgrade must specify both the code and config versions")
This time i used the correct (latest) API-Version value (04-2017) in the cluster-config right away.
Since the Error occured again, I revisited the access rights for the network folder which the diagnostic-store string in the cluster-config points to. I realized, that I forgot to give permissons to the gMSA used by this Windows-Security secured cluster.
After fixing these permissions, and the known uninstall-reinstall procedure of the ASF-Cluster the problem seemes fixed.
Reading the Azure-Service Fabric Events in the Windows Event Log (Application- and Service Protocolls -> Microsoft-Service Fabric -> Admin) was very helpful detecting the problem ;)
Original Post:
Hi Vaccanoll,
I encountered the same problems after setting up a new SF On-Prem Cluster on 3 machines.
Didn't find any good solutions until I realized, that the Configuration-Examples on Github had been updated for the CodePackageVersion 5.6.xxx. See: https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/tree/master/Samples/PreviousReleases
I moved forward making 2 changes to my initial used ClusterConfig for the CreateServiceFabricCluster-Script.
1. I changed the Api-Version like this: "apiVersion": "04-2017" -> See 5.6 Example-Configs
2. I changed my diagnosticsStore connectionString-property to an accessible, local path instead of a network-drive like this: "connectionstring": "C:\\ProgramData\\SF\\DiagnosticsStore"
After this, I deinstalled "Microsoft Azure Service Fabric" from all three machines using the "Programs & Features"-GUI under Win Server 2016 and rebooted each machine.
After the reboots I just ran the exact same CreateServiceFabricCluster as the first time, only using the updated Cluster Config.
Things went well, no errors in the Service Fabric Explorer after the reinstall.
Testing the Start-ServiceFabricClusterConfigurationUpgrade also went well, upgrading eacht of my configured failure domains one after another. Until the complete reinstall of SF I got the reported Error: "The
first Fabric upgrade must specify both the code and config versions"
Last But not Least, my Cluster-Details Page in the Service Fabric Explorer now doesn't show ConfigVersion = 0 anymore, but ConfigVersion = 1.
I don't know if there would have been easier solutions than a complete reinstall. But it did the trick for me so I tought about sharing my expiriences with you.
Good Luck solving the problem on your side!
Michael