Reputation: 69
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.
Upvotes: 0
Views: 1663
Reputation: 9024
Solution for me to stop services manually with commands:
sc stop KtlLogger
sc stop LeasLayr
after that I could delete Service Fabric folder.
Upvotes: 0
Reputation: 43
Ran into this same issue for a few days and finally managed to fix it.
For the record, in my case the issue was that I was using PowerShell 7, whereas the installation script invokes the older PowerShell 5 executable when running its commands (as in powershell.exe -Command ...
.
The solution was to run the installer directly from a PowerShell 5 shell instead.
Upvotes: 3
Reputation: 603
Could you please follow the below steps and check if that helps ?
Step 1: Please make sure that you are using a supported Windows platform version. see here.
Step 2: Open regedit and navigate to the registry path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Service Fabric SDK and confirm if the FabricSDKVersion key exists and its value is 6.1.1583.9590. See here
Step 3: If the value of FabricSDKVersion, is different than above mentioned version, then please delete the complete Service Fabric SDK key and try to install the SF SDK again and check if that helps.
Upvotes: 1