mwrock/Chocolatey-Packages

windbg fails to install on Windows Server 2012

Closed this issue · 5 comments

My theory as to what's going on is that the same policy that blocks IE on Windows Server from making requests to non-whitelisted URLs is blocking Chocolatey from downloading the package. This was in my log:

[0A8C:032C][2014-10-01T09:48:04]: Error 0x80070002: Failed to send request to URL: http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/allers/SDK Debuggers-x86_en-us.msi

I went to that URL directly in IE and saw that it was, indeed, being blocked, even though I can go to http://download.microsoft.com. In IE, the error was:

Your current security settings do not allow this file to be downloaded.

Tested w/Chocolatey v0.9.8.27.

Looked at this briefly an I was able to reproduce on win2012 but definitely unrelated to IE enhance security. I'm gonna investigate some more.

This problem seems to be limited to server OS's. breaks on 2012/2012R2 works on 8.1/7. These were the only OSs I tried. Also the GUI install did work on the server OSs.

Looking at the MSI installler log files on failed and successful runs, it looks like the installer is incorrectly building the install URLs of the dependent packages to be downloaded.

[08F8:05E0][2014-10-03T00:24:19]: Error 0x80070002: Failed to send request to URL: http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/allers/SDK Debuggers-x86_en-us.msi
[08F8:05E0][2014-10-03T00:24:19]: Error 0x80070002: Failed to connect to URL: http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/allers/SDK Debuggers-x86_en-us.msi
[08F8:05E0][2014-10-03T00:24:19]: Error 0x80070002: Failed to get size and time for URL: http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/allers/SDK Debuggers-x86_en-us.msi
[08F8:05E0][2014-10-03T00:24:19]: Error 0x80070002: Failed attempt to download URL: 'http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/allers/SDK Debuggers-x86_en-us.msi' to: 'C:\Users\ADMINI~1\AppData\Local\Temp\2\{2fc72c67-2837-46c2-b20a-9acb0d3cb2b2}\package_SDKDebuggersx86_en_us'

Note the "/allers/" in the path. The successful install logs had:

[0BE0:02A0][2014-10-03T00:34:17]: package_SDKDebuggersx86_en_us to http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/Installers/SDK Debuggers-x86_en-us.msi
[0BE0:02A0][2014-10-03T00:34:17]: Acquiring package: package_SDKDebuggersx86_en_us, payload: package_SDKDebuggersx86_en_us, download from: http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/Installers/SDK Debuggers-x86_en-us.msi
[08F8:009C][2014-10-03T00:34:18]: Verified acquired payload: package_SDKDebuggersx86_en_us at path: C:\ProgramData\Package Cache\.unverified\package_SDKDebuggersx86_en_us, moving to: C:\ProgramData\Package Cache\{9274C832-3D8A-A294-FDE8-8B9272357098}v8.100.25984\Installers\SDK Debuggers-x86_en-us.msi.

So that path should be /installers/

I'm afraid I'm at a loss as to how to fix this for server SKUs. This is all happening inside the installer so I cant influence the parsing of those URLs. I did try changing the package to just install that MSI directly but that failed and it appears that the MSI expects that EXE to be present.

What do you think of my previous suggestion as a fallback?

$path = "http://download.microsoft.com/download/B/0/C/B0C80BA3-8AD6-4958-810B-6882485230B5/standalonesdk/Installers"
$files = @(
    "$path/SDK%20Debuggers-x86en-us.msi",
    "$path/X64%20Debuggers%20And%20Tools-x64en-us.msi",
    "$path/X86%20Debuggers%20And%20Tools-x86_en-us.msi",
    "$path/0253f7df0974f9d7169b410d812a5385.cab",
    "$path/114c321d61ae77816824fed67cd25704.cab",
    "$path/1a822224523be67061edcc97f6c0e36a.cab",
    "$path/2c1331a0f4ecc46dfa39f43a575305e0.cab",
    "$path/2c1817d3f3f33cd01376c5ec441cc636.cab",
    "$path/34ee98a7c9420178c55f176f75c3fe10.cab",
    "$path/3960f55df7c8073f3997269e5e390abc.cab",
    "$path/3a53dffe0b4548753bc34825894f19bf.cab",
    "$path/3ca392fde3898c3be052ddcddd14bb5f.cab",
    "$path/437e52bd67ebe977a8957439db5ecf75.cab",
    "$path/4ac48dbdddbc8ce04721f519b9cf1698.cab",
    "$path/4de7a1422374f98369172705b05d4bf9.cab",
    "$path/7178f554c01f912c749b622564106b02.cab",
    "$path/72bda6e16f5c7a040361c1304b4b5b36.cab",
    "$path/79e9b68a34bc84ab465fe1b79b84a325.cab",
    "$path/7cb1ba9318f4b586c6a3bdd541e7f3ad.cab",
    "$path/96e8f767221532c6446fd1b8dad53b60.cab",
    "$path/a74408a87a51829b89e5282e73974d74.cab",
    "$path/ab8c11616091812d6c7137e366ba1d8d.cab",
    "$path/b98a31e36735eb82b3b238c68f36fbbf.cab",
    "$path/ba5d20281a858248e59d96d75c014391.cab",
    "$path/baa2d817ae180ba7e772f1543c3bbdea.cab",
    "$path/d55d1e003fbb00a12c63b8f618e452bf.cab",
    "$path/dcb0a55d6cacaa05ead299e1d3de3c6d.cab",
    "$path/e10f9740446a96314a1731aa7cb4286a.cab",
    "$path/e8bc712abeffd7c9711ee3f55d4aa99b.cab",
    "$path/fe80f1b6d4cf60c919f4b3a0cd2f4306.cab",
)

$wc = New-Object System.Net.WebClient
foreach ($file in $files) {
    $wc.DownloadFile($file, ...)
}

& ".\SDK Debuggers-x86en-us.msi"

Ahh. Yup. That does work. Thanks!! Its now live.

Hi.

I believe this is an issue in the windbg bootstrapper caused by running the installer using $env:temp which expands to a short (8.3) path.

In order to resolve this issue, I had to expand $env:TEMP to it's full name and use that to execute the installer.

See a more detailed explanation here:
patrickmaurer/chocolatey-packages#3 (comment)