flcdrg / au-packages

David's Chocolatey Automatic Packages
MIT License
18 stars 52 forks source link

[sql-server-express] 2019.20200409.0 error: -2146233079 #167

Open aslan-im opened 6 months ago

aslan-im commented 6 months ago

Error during package install using ansible. Playbook:

- name: Installing SQL Express
      win_chocolatey:
        name: sql-server-express
        version: 2019.20200409.0
        state: present

Output:

"Installing the following packages: sql-server-express
By installing, you accept licenses for the packages.
sql-server-express v2019.20200409.0 [Approved]
sql-server-express package files install completed. Performing other installation steps.
Downloading sql-server-express 64 bit from 'https://download.microsoft.com/download/8/4/c/84c6c430-e0f5-476d-bf43-eaaa222a72e0/SQLEXPR_x64_ENU.exe'
Download of SQLEXPR.exe (255.67 MB) completed.
C:\\Users\\User\\AppData\\Local\\Temp\\chocolatey\\sql-server-express\\2019.20200409.0\\SQLEXPR.exe
Extracting...
Installing...
Installing sql-server-express...
ERROR: Running [\"C:\\Users\\User\\AppData\\Local\\Temp\\chocolatey\\sql-server-express\\2019.20200409.0\\SQLEXPR\\setup.exe\" /IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE ] was not successful. Exit code was '-2146233079'. See log for possible error messages.
ql-server-express may be able to be automatically uninstalled.
The install of sql-server-express was NOT successful.
Error while running 'C:\\ProgramData\\chocolatey\\lib\\sql-server-express\\tools\\chocolateyinstall.ps1'.
See log for details.\r\n\r\nChocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\\ProgramData\\chocolatey\\logs\\chocolatey.log).
Failures
- sql-server-express (exited -2146233079) - Error while running 'C:\\ProgramData\\chocolatey\\lib\\sql-server-express\\tools\\chocolateyinstall.ps1'.
See log for details."

Log Content:

2024-01-26 13:57:24,826 5676 [DEBUG] - ---------------------------Script Execution---------------------------
2024-01-26 13:57:24,826 5676 [DEBUG] - Running 'ChocolateyScriptRunner' for sql-server-management-studio v19.3.4 with packageScript 'C:\ProgramData\chocolatey\lib\sql-server-management-studio\tools\chocolateyinstall.ps1', packageFolder:'C:\ProgramData\chocolatey\lib\sql-server-management-studio', installArguments: '', packageParameters: '', preRunHookScripts: '', postRunHookScripts: '',
2024-01-26 13:57:24,842 5676 [DEBUG] - Running package script 'C:\ProgramData\chocolatey\lib\sql-server-management-studio\tools\chocolateyinstall.ps1'
2024-01-26 13:57:24,889 5676 [DEBUG] - Running Get-PackageParameters 
2024-01-26 13:57:24,889 5676 [DEBUG] - Parsing $env:ChocolateyPackageParameters and $env:ChocolateyPackageParametersSensitive for parameters
2024-01-26 13:57:24,936 5676 [DEBUG] - Running Install-ChocolateyPackage -url 'https://download.microsoft.com/download/7/7/3/7738e337-ed99-40ea-b8ae-f639162c83c3/SSMS-Setup-ENU.exe' -checksum 'AFD3A8F6AABF903845BC7866D2650C83D47F659F480BB71453F74A8DED8010F7' -packageName 'sql-server-management-studio' -checksumType 'SHA256' -fileType 'EXE' -validExitCodes '0 3010 1641' -silentArgs '/quiet /install /norestart /log "C:\Users\User\AppData\Local\Temp\chocolatey\chocolatey\sql-server-management-studio\19.3.4\SSMS.MsiInstall.log"' 
2024-01-26 13:57:24,998 5676 [DEBUG] - Running Get-ChocolateyWebFile -packageName 'sql-server-management-studio' -fileFullPath 'C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\sql-server-management-studioInstall.EXE' -url 'https://download.microsoft.com/download/7/7/3/7738e337-ed99-40ea-b8ae-f639162c83c3/SSMS-Setup-ENU.exe' -url64bit '' -checksum 'AFD3A8F6AABF903845BC7866D2650C83D47F659F480BB71453F74A8DED8010F7' -checksumType 'SHA256' -checksum64 '' -checksumType64 '' -options 'System.Collections.Hashtable' -getOriginalFileName 'True' 
2024-01-26 13:57:25,014 5676 [DEBUG] - Running Get-OSArchitectureWidth -compare '64' 
2024-01-26 13:57:25,030 5676 [DEBUG] - CPU is 64 bit
2024-01-26 13:57:25,061 5676 [DEBUG] - Running Get-WebFileName -url 'https://download.microsoft.com/download/7/7/3/7738e337-ed99-40ea-b8ae-f639162c83c3/SSMS-Setup-ENU.exe' -defaultName 'sql-server-management-studioInstall.EXE' 
2024-01-26 13:57:25,170 5676 [DEBUG] - Using header 'Content-Disposition' to determine file name.
2024-01-26 13:57:25,170 5676 [DEBUG] - Using response url to determine file name. 'https://download.microsoft.com/download/7/7/3/7738e337-ed99-40ea-b8ae-f639162c83c3/SSMS-Setup-ENU.exe'
2024-01-26 13:57:25,186 5676 [DEBUG] - File name determined from url is 'SSMS-Setup-ENU.exe'
2024-01-26 13:57:25,201 5676 [DEBUG] - Running Get-WebHeaders -url 'https://download.microsoft.com/download/7/7/3/7738e337-ed99-40ea-b8ae-f639162c83c3/SSMS-Setup-ENU.exe' -ErrorAction 'Stop' 
2024-01-26 13:57:25,201 5676 [DEBUG] - Setting the UserAgent to 'chocolatey command line'
2024-01-26 13:57:25,201 5676 [DEBUG] - Request Headers:
2024-01-26 13:57:25,201 5676 [DEBUG] -   'Accept':'*/*'
2024-01-26 13:57:25,201 5676 [DEBUG] -   'User-Agent':'chocolatey command line'
2024-01-26 13:57:25,233 5676 [DEBUG] - Response Headers:
2024-01-26 13:57:25,233 5676 [DEBUG] -   'X-Cache':'TCP_HIT'
2024-01-26 13:57:25,233 5676 [DEBUG] -   'X-Ms-ApiVersion':'Distribute 1.2'
2024-01-26 13:57:25,233 5676 [DEBUG] -   'X-Ms-Region':'prod-weu-z1'
2024-01-26 13:57:25,233 5676 [DEBUG] -   'Content-Disposition':'attachment; filename=SSMS-Setup-ENU.exe; filename*=UTF-8''SSMS-Setup-ENU.exe'
2024-01-26 13:57:25,248 5676 [DEBUG] -   'X-CCC':'GB'
2024-01-26 13:57:25,248 5676 [DEBUG] -   'X-Azure-Ref-OriginShield':'Ref A: 6928AF2C1BA14BBDA6BF284BC8204548 Ref B: AMS231021014045 Ref C: 2024-01-26T11:21:55Z'
2024-01-26 13:57:25,248 5676 [DEBUG] -   'X-MSEdge-Ref':'Ref A: 029811AACD544652AE36B5151212ADC4 Ref B: LON04EDGE1221 Ref C: 2024-01-26T13:57:25Z'
2024-01-26 13:57:25,248 5676 [DEBUG] -   'Accept-Ranges':'bytes'
2024-01-26 13:57:25,248 5676 [DEBUG] -   'Content-Length':'678289744'
2024-01-26 13:57:25,248 5676 [DEBUG] -   'Content-Type':'application/octet-stream'
2024-01-26 13:57:25,248 5676 [DEBUG] -   'Date':'Fri, 26 Jan 2024 13:57:24 GMT'
2024-01-26 13:57:25,248 5676 [DEBUG] -   'ETag':'"0x8DC120D9F29FB9A"'
2024-01-26 13:57:25,248 5676 [DEBUG] -   'Last-Modified':'Wed, 10 Jan 2024 18:54:49 GMT'
2024-01-26 13:57:25,248 5676 [INFO ] - Downloading sql-server-management-studio 
  from 'https://download.microsoft.com/download/7/7/3/7738e337-ed99-40ea-b8ae-f639162c83c3/SSMS-Setup-ENU.exe'
2024-01-26 13:57:25,280 5676 [DEBUG] - Running Get-WebFile -url 'https://download.microsoft.com/download/7/7/3/7738e337-ed99-40ea-b8ae-f639162c83c3/SSMS-Setup-ENU.exe' -fileName 'C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe' -options 'System.Collections.Hashtable' 
2024-01-26 13:57:25,280 5676 [DEBUG] - Setting request timeout to  30000
2024-01-26 13:57:25,280 5676 [DEBUG] - Setting read/write timeout to  2700000
2024-01-26 13:57:25,280 5676 [DEBUG] - Setting the UserAgent to 'chocolatey command line'
2024-01-26 13:57:25,472 5676 [DEBUG] - Downloading https://download.microsoft.com/download/7/7/3/7738e337-ed99-40ea-b8ae-f639162c83c3/SSMS-Setup-ENU.exe to C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe
2024-01-26 13:57:44,928 5676 [INFO ] - 
2024-01-26 13:57:44,928 5676 [INFO ] - Download of SSMS-Setup-ENU.exe (646.87 MB) completed.
2024-01-26 13:57:47,952 5676 [DEBUG] - No runtime virus checking built into FOSS Chocolatey. Check out Pro/Business - https://chocolatey.org/compare
2024-01-26 13:57:47,952 5676 [DEBUG] - Verifying package provided checksum of 'AFD3A8F6AABF903845BC7866D2650C83D47F659F480BB71453F74A8DED8010F7' for 'C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe'.
2024-01-26 13:57:47,968 5676 [DEBUG] - Running Get-ChecksumValid -file 'C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe' -checksum 'AFD3A8F6AABF903845BC7866D2650C83D47F659F480BB71453F74A8DED8010F7' -checksumType 'SHA256' -originalUrl 'https://download.microsoft.com/download/7/7/3/7738e337-ed99-40ea-b8ae-f639162c83c3/SSMS-Setup-ENU.exe' 
2024-01-26 13:57:47,968 5676 [DEBUG] - checksum.exe found at 'C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe'
2024-01-26 13:57:47,983 5676 [DEBUG] - Executing command ['C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe' -c="AFD3A8F6AABF903845BC7866D2650C83D47F659F480BB71453F74A8DED8010F7" -t="SHA256" -f="C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe"]
2024-01-26 13:57:54,171 5676 [DEBUG] - Command ['C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe' -c="AFD3A8F6AABF903845BC7866D2650C83D47F659F480BB71453F74A8DED8010F7" -t="SHA256" -f="C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe"] exited with '0'.
2024-01-26 13:57:54,218 5676 [DEBUG] - Running Install-ChocolateyInstallPackage -packageName 'sql-server-management-studio' -fileType 'EXE' -silentArgs '/quiet /install /norestart /log "C:\Users\User\AppData\Local\Temp\chocolatey\chocolatey\sql-server-management-studio\19.3.4\SSMS.MsiInstall.log"' -file 'C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe' -validExitCodes '0 3010 1641' -useOnlyPackageSilentArguments 'False' 
2024-01-26 13:57:54,218 5676 [DEBUG] - Running Get-OSArchitectureWidth -compare '32' 
2024-01-26 13:57:54,218 5676 [INFO ] - Installing sql-server-management-studio...
2024-01-26 13:57:54,249 5676 [DEBUG] - Ensuring 'C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4' exists
2024-01-26 13:57:54,280 5676 [DEBUG] - Running Start-ChocolateyProcessAsAdmin -validExitCodes '0 3010 1641' -workingDirectory 'C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4' -statements '/quiet /install /norestart /log "C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS.MsiInstall.log" ' -exeToRun 'C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe' 
2024-01-26 13:57:54,312 5676 [DEBUG] - Test-ProcessAdminRights: returning True
2024-01-26 13:57:54,327 5676 [DEBUG] - Elevating permissions and running ["C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe" /quiet /install /norestart /log "C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS.MsiInstall.log" ]. This may take a while, depending on the statements.
2024-01-26 14:02:16,973 5676 [DEBUG] - Command ["C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS-Setup-ENU.exe" /quiet /install /norestart /log "C:\Users\User\AppData\Local\Temp\chocolatey\sql-server-management-studio\19.3.4\SSMS.MsiInstall.log" ] exited with '0'.
2024-01-26 14:02:16,989 5676 [DEBUG] - Finishing 'Start-ChocolateyProcessAsAdmin'
2024-01-26 14:02:16,989 5676 [INFO ] - sql-server-management-studio has been installed.
2024-01-26 14:02:16,989 5676 [DEBUG] - ----------------------------------------------------------------------
2024-01-26 14:02:17,005 5676 [DEBUG] - Built-in PowerShell host called with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = '';[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::SystemDefault; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\sql-server-management-studio\tools\chocolateyinstall.ps1' -installArguments '' -packageParameters '' -preRunHookScripts $null -postRunHookScripts $null'] exited with '0'.
2024-01-26 14:02:17,005 5676 [DEBUG] - Calling command ['"C:\Windows\System32\shutdown.exe" /a']
2024-01-26 14:02:17,052 5676 [DEBUG] - Command ['"C:\Windows\System32\shutdown.exe" /a'] exited with '1116'
2024-01-26 14:02:17,145 5676 [INFO ] -   sql-server-management-studio can be automatically uninstalled.
2024-01-26 14:02:17,145 5676 [WARN ] - Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
2024-01-26 14:02:17,145 5676 [DEBUG] - Logging of values is not turned on by default because it
 could potentially expose sensitive data. If you understand the risk,
 please see `choco feature -h` for information to turn it on.
2024-01-26 14:02:17,145 5676 [DEBUG] - The following values have been added/changed (may contain sensitive data):
2024-01-26 14:02:17,161 5676 [DEBUG] -   * Path='[REDACTED]' (User)
2024-01-26 14:02:17,161 5676 [DEBUG] -   * Path='[REDACTED]' (Machine)
2024-01-26 14:02:17,208 5676 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\sql-server-management-studio'
2024-01-26 14:02:17,223 5676 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\sql-server-management-studio\sql-server-management-studio.nupkg'
  with checksum '9D83970CEC3583EE84A5049C38836EC0'
2024-01-26 14:02:17,223 5676 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\sql-server-management-studio\sql-server-management-studio.nuspec'
  with checksum '2E87B7BC5CE465A4227F5E793CE7F476'
2024-01-26 14:02:17,223 5676 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\sql-server-management-studio\tools\chocolateyinstall.ps1'
  with checksum '1076B856C273D564574043A550492090'
2024-01-26 14:02:17,255 5676 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\.chocolatey\sql-server-management-studio.19.3.4".
2024-01-26 14:02:17,255 5676 [DEBUG] - There was no original file at 'C:\ProgramData\chocolatey\.chocolatey\sql-server-management-studio.19.3.4\.registry'
2024-01-26 14:02:17,270 5676 [DEBUG] - There was no original file at 'C:\ProgramData\chocolatey\.chocolatey\sql-server-management-studio.19.3.4\.files'
2024-01-26 14:02:17,270 5676 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\sql-server-management-studio.19.3.4\.extra".
2024-01-26 14:02:17,270 5676 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\sql-server-management-studio.19.3.4\.version".
2024-01-26 14:02:17,270 5676 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\sql-server-management-studio.19.3.4\.sxs".
2024-01-26 14:02:17,270 5676 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\sql-server-management-studio.19.3.4\.pin".
2024-01-26 14:02:17,270 5676 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2024-01-26 14:02:17,270 5676 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\lib\sql-server-management-studio\.chocolateyPending".
2024-01-26 14:02:17,286 5676 [INFO ] -  The install of sql-server-management-studio was successful.
2024-01-26 14:02:17,286 5676 [INFO ] -   Software installed to 'C:\Program Files\Azure Data Studio\'
2024-01-26 14:02:17,317 5676 [WARN ] - 
Chocolatey installed 1/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2024-01-26 14:02:17,317 5676 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2024-01-26 14:02:17,317 5676 [DEBUG] - Exiting with 0
aslan-im commented 6 months ago

Ran on 2 just created windows server 2022 azure VMs. Both have the same error. Another interesting observation. Once you connect to the machine via RDP at least once, the package is installed without problems, but if you have never logged into the machine, there will be an error the first, second, and third time.