Chef Client support with Windows 2019

I am using chef 13.8.5 version of chef-client and the remote_file resource is working fine on windows 2k12 r2 systems but when using remote_file resource on 2019 windows..it is failing with closed stream error and retry is also not working

What can be the reason. Do we need to update chef client version.

I had a quick look at the codebase and there have been no significant changes to remote_file itself or the classes it uses between 13.8.5 and current builds. However we do get the benefits and improvements from newer Ruby versions, OpenSSL libraries and so on in later Chef Clients so it might be worth trying that first.

If the remote_file is a resource you access over HTTP or the remote_file an HTTPS resource that is available publicly (thus allowing an easier reproduction of the error) please could you raise an issue at https://github.com/chef/chef/issues - please provide the code you wrote for the remote_file resource and ideally information from the stacktrace.out file you get from your chef-client run (if you have one).

thanks,
Stuart

Hi Stuart,

Ideally this issue is coming with remote_file always when trying to download any setup rpm or msi file from http or https repo server..it fails after 30-40%.

We consider this as a network latency problem and apply retries to it or probably use powershell script instead of remote_file..
What could be the actual problem behind this

I would definitely try with powershell_script first to see if you encounter the same issue with downloads failing after 30-40% outside of the Chef/Ruby installation on Windows Server 2019. If you get a reliable repro, try launching a Windows Server 2019 machine in another environnent (e.g. spin up one in a Cloud environment) and try from there.

If you still believe you've eliminated as much as you can other Chef/Ruby code then drop by the GitHub and raise an issue with your repro code. FWIW I did not encounter any problems testing with large files in Windows Server 2019 so I'm hopeful this is some more local to your environment.

Stuart

No.with powershell script the rpm file or msi file is getting downloaded successfully.

I don't think theres anything else I can add to what I've already suggested, I've used remote_file successfully on Windows Server 2019 with Chef 14.8 with binary files from 100MB-10GB - see screenshot:

image

I would definitely review the options at https://docs.chef.io/resource_remote_file.html to make sure you're using the correct options for your environment (especially review the section on atomic updates, and the retry options).

Stuart