powershellinstallationazure-service-fabric

Unable to reinstall Service Fabric


I was facing some issues with service fabric (although it was installed in my machine and i had worked with it previously, suddenly it stopped working. I have forgotten the exact issue i was facing. But somewhere in stack overflow it was suggested to reinstall.) So i reinstalled service fabric. I tried to download the latest runtime and sdk from : https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started

Tried to install using .\ServiceFabricRuntimeWhateverName.exe /accepteula but i faced ktlLogger.sys in a folder named "Microsoft Service Fabric" in C:/Program Files is still running and hence installation is stuck. I tried to delete it but failed. As a way around I changed the name of the Microsoft Service Fabric folder to a random name. Then again i tried to run the installation command. I get this box: error

I click OK.

Then the following logs appear:

16-03-2023 05:40:00,Info,Legacy Fabric Uninstalled using CleanFabric.ps1!
16-03-2023 05:40:04,Info,Successfully extracted cab file to C:\Program Files\Microsoft Service Fabric.mqtpr1dp.4ci
16-03-2023 05:40:04,Info,Moving FabricRoot files from 'C:\Program Files\Microsoft Service Fabric.mqtpr1dp.4ci' to 'C:\Program Files\Microsoft Service Fabric'.
16-03-2023 05:40:05,Info,Moved FabricRoot files 'C:\Program Files\Microsoft Service Fabric' successfully.
16-03-2023 05:40:05,Info,Installing Service Fabric Runtime... Logs written to: C:\WINDOWS\TEMP\FabricSetupLog_638145617961023082.log
16-03-2023 05:40:05,Info,Executing powershell.exe with parameters: -NoProfile -Command & 'C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\InstallFabric.ps1' -FabricRootIsPreInstalled -AcceptEULA -LogPath C:\WINDOWS\TEMP\FabricSetupLog_638145617961023082.log
16-03-2023 05:40:05,Info,16-03-2023 11:10:05 Running Process: powershell.exe -NoProfile -Command & 'C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\InstallFabric.ps1' -FabricRootIsPreInstalled -AcceptEULA -LogPath C:\WINDOWS\TEMP\FabricSetupLog_638145617961023082.log with timeout 00:10:00
16-03-2023 05:40:05,Info,Successfully installed Service Fabric Runtime

So now when i try to run the service fabric sdk installer i still get the error "This product Service Fabric Runtime to be installed"

Next I tried running .\ServiceFabricRuntimeWhateverName.exe /accepteula in PowerShell 7 (x64) . Here are the logs :

16-03-2023 05:45:51,Info,Installing Service Fabric Runtime. Logs written to C:\WINDOWS\TEMP\InstallFabricRuntime_638145621510218506.log
16-03-2023 05:45:51,Error,Service Fabric product installed, but cannot validate runtime & SDK compatibility due to inability to read product version from registry key 'SOFTWARE\Microsoft\Service Fabric SDK', value 'FabricSDKVersion'. Consider reinstalling.
16-03-2023 05:45:54,Info,Running extract in parallel.
16-03-2023 05:45:54,Info,16-03-2023 11:15:54 Running Process: powershell.exe -NoProfile -Command Get-ExecutionPolicy -Scope CurrentUser with timeout 00:01:00
16-03-2023 05:45:54,Info,Unpackaging autoextractor...
16-03-2023 05:45:55,Info,Creating temporary runtime directory C:\Program Files\Microsoft Service Fabric.kabnoc3z.lnq.
16-03-2023 05:45:55,Info,Extracting runtime cab to C:\Program Files\Microsoft Service Fabric.kabnoc3z.lnq...
16-03-2023 05:45:55,Info,16-03-2023 11:15:55 Running Process: C:\WINDOWS\TEMP\MicrosoftServiceFabricAutoextractor.exe /L "C:\Program Files\Microsoft Service Fabric.kabnoc3z.lnq" /E /Y with timeout 01:00:00
16-03-2023 05:45:55,Info,Current Powershell Execution Policy: Get-ExecutionPolicy : The 'Get-ExecutionPolicy' command was found in the module 'Microsoft.PowerShell.Security', but
the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Security'.
At line:1 char:1
+ Get-ExecutionPolicy -Scope CurrentUser
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-ExecutionPolicy:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
16-03-2023 05:45:55,Error,Unable to get Powershell ExecutionPolicy. ExitCode: 1
16-03-2023 05:45:55,Info,Cleaning temporary directory C:\Program Files\Microsoft Service Fabric.kabnoc3z.lnq

I am stuck like this for two days now. Please help. Not sure if this is the right forum to post on. Did not find any tag related to Service Fabric in Super User. And since this is an issue i am facing for Service Fabric installation so i thought may be i can post it here.

Update Suddenly i find Another Microsoft Service Fabric folder has been created in program files after running the Runtime Installer. But still the runtime installer is giving out same error.


Solution

  • I factory reset my pc and reinstalled service fabric.