We are experiencing an issue whereby the Chef omnibus installer encounters an HTTP 405 error when it attempts to download the Chef 12 Windows installer from packages.chef.io; here’s some relevant output from a Test Kitchen converge
step running against the latest Windows 2016 Server AMI in AWS:
-----> Installing Chef Omnibus (12)
There was an error:
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (405) Method Not Allowed."
The remote server returned an error: (405) Method Not Allowed.
$$$$$$ Get-Item : Cannot find path 'C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-12.21.26-1-x64.msi'
because it does not
$$$$$$ exist.
$$$$$$ At C:\windows\temp\winrm-elevated-shell-f4568a91-4a57-47d6-98ba-12ec5a6dbeb2.ps1:191 char:37
$$$$$$ + $bytes = $c.ComputeHash(($in = (Get-Item $src).OpenRead()))
$$$$$$ + ~~~~~~~~~~~~~
$$$$$$ + CategoryInfo : ObjectNotFound: (C:\Users\ADMINI...21.26-1-x64.msi:String) [Get-Item], ItemNotFoundExcep
$$$$$$ tion
$$$$$$ + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
$$$$$$
$$$$$$ You cannot call a method on a null-valued expression.
$$$$$$ At C:\windows\temp\winrm-elevated-shell-f4568a91-4a57-47d6-98ba-12ec5a6dbeb2.ps1:191 char:30
$$$$$$ + $bytes = $c.ComputeHash(($in = (Get-Item $src).OpenRead()))
$$$$$$ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$$$$$$ + CategoryInfo : InvalidOperation: (:) [], RuntimeException
$$$$$$ + FullyQualifiedErrorId : InvokeMethodOnNull
$$$$$$ Failed to download from
$$$$$$ https://packages.chef.io/files/stable/chef/12.21.26/windows/2016/chef-client-12.21.26-1-x64.msi.
$$$$$$ At C:\windows\temp\winrm-elevated-shell-f4568a91-4a57-47d6-98ba-12ec5a6dbeb2.ps1:295 char:5
$$$$$$ + throw "Failed to download from $uri."
$$$$$$ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$$$$$$ + CategoryInfo : OperationStopped: (Failed to downl...1.26-1-x64.msi.:String) [], RuntimeException
$$$$$$ + FullyQualifiedErrorId : Failed to download from https://packages.chef.io/files/stable/chef/12.21.26/windows/2016
$$$$$$ /chef-client-12.21.26-1-x64.msi.
Weirdly, this very same Kitchen configuration was working fine yesterday, so I’m at a loss for what changed.