# '$ knife wsman test' fails

**URL:** <https://discourse.chef.io/t/knife-wsman-test-fails/7996>\
**Category:** Chef Infra (archive)\
**Created:** [March 16, 2016, 2:34pm UTC](https://discourse.chef.io/t/knife-wsman-test-fails/7996 "2016-03-16T14:34:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/victor/32/1259_2.png) [@Victor](https://discourse.chef.io/u/Victor)\
**Post date:** [March 16, 2016, 2:34pm UTC](https://discourse.chef.io/t/knife-wsman-test-fails/7996/1 "2016-03-16T14:34:21Z")

</div>

I’m following this tutorial [https://learn.chef.io/manage-a-node/windows/get-a-node-to-bootstrap/](https://learn.chef.io/manage-a-node/windows/get-a-node-to-bootstrap/) to bootstrtap a Windows 2012 r2 node.

But when I ran the following test from my Chef DK on Ubuntu (step 5 in the tutorial),

$ knife wsman test IP\_ADDRESS\_OF\_MY\_WINDOWS\_NODE --manual-list --winrm-transport ssl --winrm-ssl-verify-mode verify\_none

I got the following error:

$ knife wsman test IP\_ADDRESS\_OF\_MY\_WINDOWS\_NODE --manual-list --winrm-transport ssl --winrm-ssl-verify-mode verify\_none  
WARNING: \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \* \*  
SSL validation of HTTPS requests for the WinRM transport is disabled. HTTPS WinRM  
connections are still encrypted, but knife is not able to detect forged replies  
or spoofing attacks.

To fix this issue add an entry like this to your knife configuration file:

```auto
  # Verify all WinRM HTTPS connections (default, recommended)
  knife[:winrm_ssl_verify_mode] = :verify_peer

```

* * *

Connected successfully to IP\_ADDRESS\_OF\_MY\_WINDOWS\_NODE at https://IP\_ADDRESS\_OF\_MY\_WINDOWS\_NODE:5986/wsman.  
WARNING: Failed to connect to IP\_ADDRESS\_OF\_MY\_WINDOWS\_NODE at https://IP\_ADDRESS\_OF\_MY\_WINDOWS\_NODE:5986/wsman.  
ERROR: Failed to connect to 1 nodes.

Why is it connected successfully first but then disconnected?

Versions I’m using:

$ chef gem list | grep windows  
knife-windows (1.2.1)

$ chef -v  
Chef Development Kit Version: 0.11.0  
chef-client version: 12.7.2  
berks version: 4.1.1  
kitchen version: 1.5.0

Thanks in advance for any tips to fix this.

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/victor/32/1259_2.png) [@Victor](https://discourse.chef.io/u/Victor)\
**Post date:** [March 16, 2016, 2:56pm UTC](https://discourse.chef.io/t/knife-wsman-test-fails/7996/2 "2016-03-16T14:56:39Z")

</div>

I did the above in an environment that connects to the Internet via proxy.

I also did the above tutorial in an environment without proxy. The ‘knife wsman test’ was successful without errors.

---

<div class="post-metadata">

**Author:** ![tpetchel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tpetchel/32/1201_2.png) [@tpetchel](https://discourse.chef.io/u/tpetchel)\
**Post date:** [March 21, 2016, 12:32pm UTC](https://discourse.chef.io/t/knife-wsman-test-fails/7996/3 "2016-03-21T12:32:16Z")

</div>

Hi Victor,

You likely need to configure `knife` to work with your proxy. We’re planning a Learn Chef tutorial that helps guide you through your use of Chef from behind the firewall or proxy.

For now, does anything in the [documentation](https://docs.chef.io/proxies.html) help?

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/victor/32/1259_2.png) [@Victor](https://discourse.chef.io/u/Victor)\
**Post date:** [March 21, 2016, 1:35pm UTC](https://discourse.chef.io/t/knife-wsman-test-fails/7996/4 "2016-03-21T13:35:04Z")

</div>

Hello tpetchel.

I had already configured proxy settings per the doc link you mentioned above before I tried my unsuccessful Windows bootstrapping. However, I can bootstrap Ubuntu and RHEL nodes in the same environment without issues. I have also used WinRM in Chef Compliance to successfully connect to and scan the same Windows node.

It’ll be very helpful if you guys can provide the following documentation:  
How to configure knife-windows to work with Windows nodes in an environment that goes through a proxy to reach the Internet.  
How to configure bootstrapping (both Windows and Linux nodes) with no Internet connection.(E.g., pre-download chef client .deb, gems, etc. Prod environment may not have any Internet access.)

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/victor/32/1259_2.png) [@Victor](https://discourse.chef.io/u/Victor)\
**Post date:** [March 22, 2016, 7:41pm UTC](https://discourse.chef.io/t/knife-wsman-test-fails/7996/5 "2016-03-22T19:41:48Z")

</div>

‘knife wsman test’ and Windows bootstrapping are working now after I commented out http\_proxy in knfe.rb (I had no\_proxy but that didn’t have effects).
