# Chef Client support with Windows 2019

**URL:** <https://discourse.chef.io/t/chef-client-support-with-windows-2019/14386>\
**Category:** Chef Infra (archive)\
**Created:** [January 25, 2019, 6:48am UTC](https://discourse.chef.io/t/chef-client-support-with-windows-2019/14386 "2019-01-25T06:48:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![priyanshu](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@priyanshu](https://discourse.chef.io/u/priyanshu)\
**Post date:** [January 25, 2019, 6:48am UTC](https://discourse.chef.io/t/chef-client-support-with-windows-2019/14386/1 "2019-01-25T06:48:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![stuartpreston](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/stuartpreston/32/1771_2.png) [@stuartpreston](https://discourse.chef.io/u/stuartpreston)\
**Post date:** [January 25, 2019, 9:52am UTC](https://discourse.chef.io/t/chef-client-support-with-windows-2019/14386/2 "2019-01-25T09:52:18Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![priyanshu](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@priyanshu](https://discourse.chef.io/u/priyanshu)\
**Post date:** [January 25, 2019, 9:55am UTC](https://discourse.chef.io/t/chef-client-support-with-windows-2019/14386/3 "2019-01-25T09:55:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stuartpreston](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/stuartpreston/32/1771_2.png) [@stuartpreston](https://discourse.chef.io/u/stuartpreston)\
**Post date:** [January 25, 2019, 10:37am UTC](https://discourse.chef.io/t/chef-client-support-with-windows-2019/14386/4 "2019-01-25T10:37:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![priyanshu](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@priyanshu](https://discourse.chef.io/u/priyanshu)\
**Post date:** [January 25, 2019, 10:39am UTC](https://discourse.chef.io/t/chef-client-support-with-windows-2019/14386/5 "2019-01-25T10:39:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stuartpreston](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/stuartpreston/32/1771_2.png) [@stuartpreston](https://discourse.chef.io/u/stuartpreston)\
**Post date:** [January 25, 2019, 11:09am UTC](https://discourse.chef.io/t/chef-client-support-with-windows-2019/14386/6 "2019-01-25T11:09:23Z")

</div>

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](https://sea2.discourse-cdn.com/flex016/images/transparent.png)

I would definitely review the options at [https://docs.chef.io/resource\_remote\_file.html](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
