问题
We got a Service Fabric cluster in our development environment using 2 VMs. I was trying to upgrade the Application deployed in SF using the following command:
Start-ServiceFabricApplicationUpgrade -ApplicationName "fabric:/ApplicationName" -ApplicationTypeVersion "3.7.2625.0" -UnMonitoredAuto
I get the following error as a result:
Start-ServiceFabricApplicationUpgrade : Application type and version not found At line:1 char:1 + Start-ServiceFabricApplicationUpgrade -ApplicationName "fabric:/ApplicationName" ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Microsoft.Servi...usterConnection:ClusterConnection) [Start-ServiceFabricApplicationUpgrade], FabricElementNotFoundException + FullyQualifiedErrorId : UpgradeApplicationErrorId,Microsoft.ServiceFabric.Powershell.StartApplicationUpgrade
I would like to know whether there are any configurations I need to change at the ClusterConfiguration level. Any help would be appreciated.
Thanks.
回答1:
There are 3 simple steps to upgrade an application:
Copy-ServiceFabricApplicationPackage
Register-ServiceFabricApplicationType
Start-ServiceFabricApplicationUpgrade
By the message you posted, the error is likely because you missed the step 2.
If you have executed the step 1, 2 and 3, certify that:
- The application package has been registered correctly
- The application version you registered is correct, both match, the package and the Upgrade command
- The existing application and the registered one are from same type
Check this doc for more info: Service Fabric application upgrade using PowerShell
来源:https://stackoverflow.com/questions/51768831/getting-error-as-part-of-trying-to-upgrade-service-fabric-application-using-star