microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.02k stars 399 forks source link

[BUG] - Unable to install Fabric runtime. Unable to extract exe. ExitCode: 1 #1336

Open RetainPhil opened 2 years ago

RetainPhil commented 2 years ago

Attempting to install Fabric sdk fails due to runtime install failure. Log shows a non-descript error from the installer:

29/03/2022 20:38:49,Info,29/03/2022 21:38:49 Running Process: C:\windows\TEMP\MicrosoftServiceFabricAutoextractor.exe /L "C:\Program Files\Microsoft Service Fabric" /E /Y with timeout 01:00:00
29/03/2022 20:38:54,Error,Unable to extract exe. ExitCode: 1

Area/Component: fabric runtime installer

To Reproduce Steps to reproduce the behavior:

Observed behavior: Installation fails with Error,Unable to extract exe. ExitCode: 1

Screenshots WebPlatformInstaller_bdyfzftvYP

Service Fabric Runtime Version: 8.2.*

Environment:

Additional context InstallFabricRuntime.log


Assignees: /cc @microsoft/service-fabric-triage

RetainPhil commented 2 years ago

Why's VS still directing us to use WPI to install SF sdk anyway? The software is about to be shelved in a couple of months right? https://blogs.iis.net/iisteam/web-platform-installer-end-of-support-feed

RetainPhil commented 2 years ago

Unfortunately for me - I'm now reproducing this issue on a second machine.

The issue started occuring after re-installing Web Platform Installer on the second machine. Here's logs from WPI:

InstallFabricRuntime.log

30/03/2022 17:24:59,Info,Installing Service Fabric Runtime. Logs written to C:\WINDOWS\TEMP\InstallFabricRuntime_637842614996305321.log
30/03/2022 17:24:59,Info,Running extract in parallel.
30/03/2022 17:24:59,Info,Unpackaging autoextractor...
30/03/2022 17:24:59,Info,30/03/2022 18:24:59 Running Process: powershell.exe -NoProfile -Command Get-ExecutionPolicy -Scope CurrentUser with timeout 00:01:00
30/03/2022 17:25:00,Info,Current Powershell Execution Policy: Unrestricted
30/03/2022 17:25:00,Info,Searching for legacy installation registry key.
30/03/2022 17:25:00,Info,Service Fabric Product not detected in registry.
30/03/2022 17:25:01,Info,Creating temporary runtime directory C:\Program Files\Microsoft Service Fabric.mscamw04.euf.
30/03/2022 17:25:01,Info,Extracting runtime cab to C:\Program Files\Microsoft Service Fabric.mscamw04.euf...
30/03/2022 17:25:01,Info,30/03/2022 18:25:01 Running Process: C:\WINDOWS\TEMP\MicrosoftServiceFabricAutoextractor.exe /L "C:\Program Files\Microsoft Service Fabric.mscamw04.euf" /E /Y with timeout 01:00:00
30/03/2022 17:25:06,Error,Unable to extract exe. ExitCode: 1
30/03/2022 17:25:06,Info,Deleting C:\Program Files\Microsoft Service Fabric.mscamw04.euf...
30/03/2022 17:25:06,Info,Successfully deleted C:\Program Files\Microsoft Service Fabric.mscamw04.euf.
30/03/2022 17:25:06,Info,Running extract synchronously.
30/03/2022 17:25:06,Info,Unpackaging autoextractor...
30/03/2022 17:25:07,Info,Creating temporary runtime directory C:\Program Files\Microsoft Service Fabric.mscamw04.euf.
30/03/2022 17:25:07,Info,Extracting runtime cab to C:\Program Files\Microsoft Service Fabric...
30/03/2022 17:25:07,Info,30/03/2022 18:25:07 Running Process: C:\WINDOWS\TEMP\MicrosoftServiceFabricAutoextractor.exe /L "C:\Program Files\Microsoft Service Fabric" /E /Y with timeout 01:00:00
30/03/2022 17:25:10,Error,Unable to extract exe. ExitCode: 1
30/03/2022 17:25:10,Info,Deleting C:\Program Files\Microsoft Service Fabric...
30/03/2022 17:25:10,Info,Successfully deleted C:\Program Files\Microsoft Service Fabric.
30/03/2022 17:25:10,Info,Cleaning temporary directory C:\Program Files\Microsoft Service Fabric.mscamw04.euf
Press enter to exit. Process will automatically close after 30 seconds.

webpi4.txt:

DownloadManager Information: 0 : Loading product xml from: https://aka.ms/webpifeed51
DownloadManager Information: 0 : https://aka.ms/webpifeed51 responded with 301
DownloadManager Information: 0 : Response headers:
HTTP/1.1 301 Moved Permanently
Location: https://webpifeed.blob.core.windows.net/webpifeed/5.1/WebProductList.xml
Server: Kestrel
Request-Context: appId=cid-v1:9b037ab9-fa5a-4c09-81bd-41ffa859f01e
X-Response-Cache-Status: True
Content-Length: 0
Expires: Wed, 30 Mar 2022 17:23:56 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 30 Mar 2022 17:23:56 GMT
Connection: keep-alive
Strict-Transport-Security: max-age=31536000 ; includeSubDomains

DownloadManager Information: 0 : https://webpifeed.blob.core.windows.net/webpifeed/5.1/WebProductList.xml responded with 304
DownloadManager Information: 0 : Response headers:
HTTP/1.1 304 The condition specified using HTTP conditional header(s) is not met.
Content-Length: 0
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 37d6b17b-601e-00bc-195a-442f18000000
x-ms-version: 2009-09-19
Date: Wed, 30 Mar 2022 17:23:56 GMT

DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\1460077924.xml.temp
DownloadManager Warning: 0 : Could not resolve keyword ID 5nine
DownloadManager Warning: 0 : Could not resolve keyword ID Security
DownloadManager Warning: 0 : Could not resolve keyword ID 5nine
DownloadManager Warning: 0 : Could not resolve keyword ID Security
DownloadManager Warning: 0 : Could not resolve keyword ID Backup
DownloadManager Warning: 0 : Could not resolve keyword ID Portal
DownloadManager Warning: 0 : Could not resolve keyword ID Backup
DownloadManager Warning: 0 : Could not resolve keyword ID Portal
DownloadManager Warning: 0 : Could not resolve keyword ID Backup
DownloadManager Warning: 0 : Could not resolve keyword ID Resource Provider
DownloadManager Warning: 0 : Could not resolve keyword ID VMWare
DownloadManager Warning: 0 : Could not resolve keyword ID Hybrid Cloud
DownloadManager Warning: 0 : Could not resolve keyword ID Windows Azure Pack
DownloadManager Warning: 0 : Could not resolve keyword ID Cloud Assert
DownloadManager Warning: 0 : Could not resolve keyword ID VMWare
DownloadManager Warning: 0 : Could not resolve keyword ID Hybrid Cloud
DownloadManager Warning: 0 : Could not resolve keyword ID Windows Azure Pack
DownloadManager Warning: 0 : Could not resolve keyword ID Cloud Assert
DownloadManager Warning: 0 : Could not resolve keyword ID VMWare
DownloadManager Warning: 0 : Could not resolve keyword ID Hybrid Cloud
DownloadManager Warning: 0 : Could not resolve keyword ID Windows Azure Pack
DownloadManager Warning: 0 : Could not resolve keyword ID Cloud Assert
DownloadManager Warning: 0 : Could not resolve keyword ID Usage
DownloadManager Warning: 0 : Could not resolve keyword ID Billing
DownloadManager Warning: 0 : Could not resolve keyword ID Hybrid Cloud
DownloadManager Warning: 0 : Could not resolve keyword ID Windows Azure Pack
DownloadManager Warning: 0 : Could not resolve keyword ID Cloud Assert
DownloadManager Warning: 0 : Could not resolve keyword ID Usage
DownloadManager Warning: 0 : Could not resolve keyword ID Billing
DownloadManager Warning: 0 : Could not resolve keyword ID Hybrid Cloud
DownloadManager Warning: 0 : Could not resolve keyword ID Windows Azure Pack
DownloadManager Warning: 0 : Could not resolve keyword ID Cloud Assert
DownloadManager Warning: 0 : Could not resolve keyword ID Usage
DownloadManager Warning: 0 : Could not resolve keyword ID Billing
DownloadManager Warning: 0 : Could not resolve keyword ID Hybrid Cloud
DownloadManager Warning: 0 : Could not resolve keyword ID Windows Azure Pack
DownloadManager Warning: 0 : Could not resolve keyword ID Cloud Assert
DownloadManager Warning: 0 : Could not resolve keyword ID Usage
DownloadManager Warning: 0 : Could not resolve keyword ID Billing
DownloadManager Warning: 0 : Could not resolve keyword ID Hybrid Cloud
DownloadManager Warning: 0 : Could not resolve keyword ID Windows Azure Pack
DownloadManager Warning: 0 : Could not resolve keyword ID Cloud Assert
DownloadManager Warning: 0 : Could not resolve keyword ID Cloud Cruiser
DownloadManager Warning: 0 : Could not resolve keyword ID Billing
DownloadManager Warning: 0 : Could not resolve keyword ID Showback
DownloadManager Warning: 0 : Could not resolve keyword ID Cloud Cruiser
DownloadManager Warning: 0 : Could not resolve keyword ID Billing
DownloadManager Warning: 0 : Could not resolve keyword ID Showback
DownloadManager Warning: 0 : Could not resolve keyword ID Terawe
DownloadManager Information: 0 : Filtering by current OS
DownloadManager Information: 0 : Loading product xml from: https://webpifeed.blob.core.windows.net/webpifeed/5.1/WebApplicationList.xml
DownloadManager Information: 0 : https://webpifeed.blob.core.windows.net/webpifeed/5.1/WebApplicationList.xml responded with 304
DownloadManager Information: 0 : Response headers:
HTTP/1.1 304 The condition specified using HTTP conditional header(s) is not met.
Content-Length: 0
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 37d6b8a5-601e-00bc-145a-442f18000000
x-ms-version: 2009-09-19
Date: Wed, 30 Mar 2022 17:23:57 GMT

DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\-1283728074.xml.temp
DownloadManager Information: 0 : Filtering by current OS
DownloadManager Information: 0 : Sucessfully loaded the feed 'https://webpifeed.blob.core.windows.net/webpifeed/5.1/WebApplicationList.xml' after preprocessing, location on disk: 'C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\preprocessor\-1283728074.xml'
DownloadManager Information: 0 : Loading product xml from: https://webpifeed.blob.core.windows.net/webpifeed/5.1/MediaProductList.xml
DownloadManager Information: 0 : https://webpifeed.blob.core.windows.net/webpifeed/5.1/MediaProductList.xml responded with 304
DownloadManager Information: 0 : Response headers:
HTTP/1.1 304 The condition specified using HTTP conditional header(s) is not met.
Content-Length: 0
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 37d6bb3e-601e-00bc-0b5a-442f18000000
x-ms-version: 2009-09-19
Date: Wed, 30 Mar 2022 17:23:58 GMT

DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\1281628600.xml.temp
DownloadManager Information: 0 : Filtering by current OS
DownloadManager Information: 0 : Sucessfully loaded the feed 'https://webpifeed.blob.core.windows.net/webpifeed/5.1/MediaProductList.xml' after preprocessing, location on disk: 'C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\preprocessor\1281628600.xml'
DownloadManager Information: 0 : Loading product xml from: https://webpifeed.blob.core.windows.net/webpifeed/5.1/ToolsProductList.xml
DownloadManager Information: 0 : https://webpifeed.blob.core.windows.net/webpifeed/5.1/ToolsProductList.xml responded with 304
DownloadManager Information: 0 : Response headers:
HTTP/1.1 304 The condition specified using HTTP conditional header(s) is not met.
Content-Length: 0
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 37d6bc45-601e-00bc-1a5a-442f18000000
x-ms-version: 2009-09-19
Date: Wed, 30 Mar 2022 17:23:58 GMT

DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\-579566788.xml.temp
DownloadManager Information: 0 : Filtering by current OS
DownloadManager Information: 0 : Sucessfully loaded the feed 'https://webpifeed.blob.core.windows.net/webpifeed/5.1/ToolsProductList.xml' after preprocessing, location on disk: 'C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\preprocessor\-579566788.xml'
DownloadManager Information: 0 : Loading product xml from: https://webpifeed.blob.core.windows.net/webpifeed/5.1/EnterpriseProductList.xml
DownloadManager Information: 0 : https://webpifeed.blob.core.windows.net/webpifeed/5.1/EnterpriseProductList.xml responded with 304
DownloadManager Information: 0 : Response headers:
HTTP/1.1 304 The condition specified using HTTP conditional header(s) is not met.
Content-Length: 0
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 37d6bd93-601e-00bc-555a-442f18000000
x-ms-version: 2009-09-19
Date: Wed, 30 Mar 2022 17:23:58 GMT

DownloadManager Information: 0 : Remote file has not changed, using local cached file: C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\2139927868.xml.temp
DownloadManager Information: 0 : Filtering by current OS
DownloadManager Information: 0 : Sucessfully loaded the feed 'https://webpifeed.blob.core.windows.net/webpifeed/5.1/EnterpriseProductList.xml' after preprocessing, location on disk: 'C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\preprocessor\2139927868.xml'
DownloadManager Information: 0 : Sucessfully loaded the feed 'https://aka.ms/webpifeed51' after preprocessing, location on disk: 'C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\preprocessor\1460077924.xml'
DownloadManager Information: 0 : Getting ratings file from http://go.microsoft.com/?linkid=9752395
DownloadManager Information: 0 : http://go.microsoft.com/?linkid=9752395 responded with 302
DownloadManager Information: 0 : Response headers:
HTTP/1.1 302 Moved Temporarily
Location: https://www.microsoft.com/web/handlers/WebPI.ashx?command=getatomfeedwithavgratingquery
Server: Kestrel
Request-Context: appId=cid-v1:26ef1154-5995-4d24-ad78-ef0b04f11587
X-Response-Cache-Status: True
Content-Length: 0
Expires: Wed, 30 Mar 2022 17:23:59 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 30 Mar 2022 17:23:59 GMT
Connection: keep-alive

DownloadManager Information: 0 : Number of bytes downloaded over the internet: '0'
DownloadManager Information: 0 : Number of bytes after possible decompression: '0'
DownloadManager Warning: 0 : Error getting last-modified header, error code: 12150
DownloadManager Warning: 0 : HttpQueryInfoWithRetry for HTTP_QUERY_LAST_MODIFIED failed.
DownloadManager Error: 0 : Error loading rating files: System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at Microsoft.Web.PlatformInstaller.ProductServiceImpl.GetAppRatings()
DownloadManager Information: 0 : Adding product Microsoft Azure Service Fabric SDK - 5.2.1571 (MicrosoftAzure-ServiceFabric-CoreSDK) to cart
DownloadManager Information: 0 : Adding product 'MicrosoftAzure-ServiceFabric-CoreSDK'
DownloadManager Information: 0 : Adding dependency product 'ServiceFabricSDK_5_2_CU2_1
DownloadManager Information: 0 : Adding dependency product 'ServiceFabricRuntime_8_2_CU2_1
DownloadManager Information: 0 : Setting current install to 1
DownloadManager Information: 0 : Starting install sequence
DownloadManager Information: 0 : Using cached file at C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\installers\ServiceFabricRuntime_8_2_CU2_1\DC2C5EA91C780EA0995FB7E2C388DA701EF754B3\MicrosoftServiceFabric.8.2.1571.9590.exe instead of downloading from https://download.microsoft.com/download/b/8/a/b8a2fb98-0ec1-41e5-be98-9d8b5abf7856/MicrosoftServiceFabric.8.2.1571.9590.exe
DownloadManager Information: 0 : Using cached file at C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\installers\ServiceFabricSDK_5_2_CU2_1\D7D4BFC2F01F71CE266D5A45D0EC8C6EB3163F36\MicrosoftServiceFabricSDK.5.2.1571.msi instead of downloading from https://download.microsoft.com/download/b/8/a/b8a2fb98-0ec1-41e5-be98-9d8b5abf7856/MicrosoftServiceFabricSDK.5.2.1571.msi
DownloadManager Information: 0 : Starting EXE command for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571'. Commandline is: 'C:\WINDOWS\sysnative\cmd.exe /c wmic product where name="Microsoft Azure Service Fabric" call uninstall'. Process Id: 16720
DownloadManager Information: 0 : Install exit code for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571' is '0'
DownloadManager Information: 0 : Ignoring exit code '0' for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571'
DownloadManager Information: 0 : Starting EXE command for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571'. Commandline is: 'C:\WINDOWS\sysnative\cmd.exe /c sc.exe stop KtlLogger'. Process Id: 2428
DownloadManager Information: 0 : Install exit code for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571' is '1060'
DownloadManager Information: 0 : Ignoring exit code '1060' for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571'
DownloadManager Information: 0 : Starting EXE command for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571'. Commandline is: 'C:\WINDOWS\sysnative\cmd.exe /c sc.exe stop LeasLayr'. Process Id: 10688
DownloadManager Information: 0 : Install exit code for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571' is '1060'
DownloadManager Information: 0 : Ignoring exit code '1060' for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571'
DownloadManager Information: 0 : Starting EXE command for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571'. Commandline is: 'C:\Users\P10408811\AppData\Local\Microsoft\Web Platform Installer\installers\ServiceFabricRuntime_8_2_CU2_1\DC2C5EA91C780EA0995FB7E2C388DA701EF754B3\MicrosoftServiceFabric.8.2.1571.9590.exe /AcceptEULA'. Process Id: 8876
DownloadManager Information: 0 : Install exit code for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571' is '1'
DownloadManager Error: 0 : Install return code for product 'Microsoft Azure Service Fabric Runtime - 8.2.1571' is Failure
DownloadManager Information: 0 : Product Microsoft Azure Service Fabric Runtime - 8.2.1571 done install completed
DownloadManager Information: 0 : Increasing current install to 2
DownloadManager Warning: 0 : Dependency failed for product 'Microsoft Azure Service Fabric SDK - 5.2.1571'. Skipping install
DownloadManager Warning: 0 : Dependency failed for product 'Microsoft Azure Service Fabric SDK - 5.2.1571'. Skipping install
DownloadManager Information: 0 : Product Microsoft Azure Service Fabric SDK - 5.2.1571 had a dependency fail. Increasing install product to 3
DownloadManager Information: 0 : Product Microsoft Azure Service Fabric SDK - 5.2.1571 had a dependency fail. Increasing install product to 4
DownloadManager Information: 0 : Product: ServiceFabricRuntime_8_2_CU2_1, Install Status: InstallCompleted-Failure, Install Time: 00:01:29.1510020
DownloadManager Information: 0 : Product: ServiceFabricSDK_5_2_CU2_1, Install Status: DependencyFailed-None, Install Time: 00:00:00
DownloadManager Information: 0 : Product: MicrosoftAzure-ServiceFabric-CoreSDK, Install Status: DependencyFailed-None, Install Time: 00:00:00
RetainPhil commented 2 years ago

I tried both VS2019 & VS2022 - made no difference.

In the end I manually downloaded the runtime installer (e.g. MicrosoftServiceFabric.8.2.1571.9590.exe) fromdirect download link in the release notes and run it with MicrosoftServiceFabric.8.2.1571.9590.exe /accepteula /force

When you're running the installer you can copy MicrosoftServiceFabricAutoextractor.exe from C:\Windows\Temp\ before the installer deletes it. Create "C:\Program Files\Microsoft Service Fabric\" if it doesn't exist already and then run MicrosoftServiceFabricAutoextractor.exe /E /Y from there to unpack the installation (this part is failing for me a lot though... if it fails, try using 7zip to unpack it instead).

After that, finish the install: cd "C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code" .".\InstallFabric.ps1" -FabricRootIsPreInstalled -AcceptEULA -LogPath 'C:\InstallFabric.log'

Hopefully that helps someone else.

I agree jack, it seems quite unlikely to get a response from the team here, looking at the other open issues in here.

RetainPhil commented 2 years ago

Slightly more info on this - I narrowed down the problem to extraction of self-extracting archive MicrosoftServiceFabricAutoextractor.exe - it seems like this extractor is based on unsupported program "extract.exe" in Windows 10, according to Microsoft own docs: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/extract

explorer_tC2sVnK97L

chrome_Jf7huL2SpC

When running the self-extractor using MicrosoftServiceFabricAutoextractor.exe /E /Y it just falls over in random places each time e.g.