Service Fabric 'Registration of application type failed' random issue
Hi,
From time to time I'm facing deployment issues to Service Fabric Cluster.
Using Deploy-FabricApplication.ps1 script from SDK I randomly get the following error:
Copying application to image store...
Upload to Image Store succeeded
Registering application type...
Register application type started. Use Get-ServiceFabricApplicationType to query for status.
Running Image Builder process ...
Downloaded 1/109 Files (0.9 % complete)
Downloaded 20/109 Files (18.3 % complete)
Downloaded 47/109 Files (43.1 % complete)
Downloaded 65/109 Files (59.6 % complete)
Downloaded 78/109 Files (71.6 % complete)
Downloaded 82/109 Files (75.2 % complete)
Downloaded 94/109 Files (86.2 % complete)
Downloaded 96/109 Files (88.1 % complete)
Validating package and computing checksums ...
Copied 'AppName\AppPkg\Code.zip': completed 57/216 packages and checksums (26.4 %).
Copied 'F:\SvcFab\ImageBuilderProxy\AppType\238f91ff-ab26-4412-b20a-b88799bd15bf\AppName.App1Pkg\Config.checksum': completed 65/216 packages and checksums (30.1 %).
Copied 'F:\SvcFab\ImageBuilderProxy\AppType\238f91ff-ab26-4412-b20a-b88799bd15bf\AppName.App2Pkg\Config.checksum': completed 66/216 packages and checksums (30.6 %).
Copied 'AppName\AppName.App3Pkg\Config.zip': completed 79/216 packages and checksums (36.6 %).
Copied 'AppName\AppName.App3Pkg\Code.zip': completed 92/216 packages and checksums (42.6 %).
Uploaded 'F:\SvcFab\ImageBuilderProxy\AppType\238f91ff-ab26-4412-b20a-b88799bd15bf\AppName.App4Pkg\ServiceManifest.xml.checksum': completed 100/216 packages and checksums (46.3 %).
Copied 'F:\SvcFab\ImageBuilderProxy\AppType\238f91ff-ab26-4412-b20a-b88799bd15bf\AppName.App5Pkg\Config.checksum': completed 130/216 packages and checksums (60.2 %).
OperationsPending: An error occurred during this operation. Please check the trace logs for more details. --> COMException: Exception from HRESULT: 0x80071C9E
Registration of application type failed.
Error message is logged
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1:308 char:17
+ throw "Registration of application type failed."
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Registration of application type failed.:String) [], RuntimeException
+ FullyQualifiedErrorId : Registration of application type failed.
Process exited with code 1
At the same time, the following error appears in Service Fabric Explorer
OperationsPending: An error occurred during this operation. Please check the trace logs for more details. --> COMException: Exception from HRESULT: 0x80071C9E
Also, when I trying to build and deploy the same code again - it deploys successfully. So I'm sure that the problem is not on the application side.
In rare cases, I can successfully deploy the application only after VM Scale Set rebooting
Could someone please help to understand why this can happens? Or where I can see additional trace logs for further investigation?