# Winrm

**URL:** <https://discourse.chef.io/t/winrm/4471>\
**Category:** Chef Infra (archive)\
**Created:** [September 18, 2013, 9:03pm UTC](https://discourse.chef.io/t/winrm/4471 "2013-09-18T21:03:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikhil\_Shah](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nikhil\_Shah](https://discourse.chef.io/u/Nikhil_Shah)\
**Post date:** [September 18, 2013, 9:03pm UTC](https://discourse.chef.io/t/winrm/4471/1 "2013-09-18T21:03:17Z")

</div>

Anyone seen this error message? I had it working (of course with the hosted solution); however, this is the first windows server I’m launching hosting my open source server in house:

ERROR: Failed to authenticate to [“192.168.XX.XX”] as administrator  
Response: Bad HTTP response returned from server (401).  
DEBUG: Adding 192.168.XX.XX  
DEBUG: :session =\> :init  
DEBUG: :relay\_to\_servers =\> cmd.exe /C %TEMP%\bootstrap-5449-1379538020.bat  
DEBUG: :relayed =\> 192.168.XX.XX  
DEBUG: 192.168.XX.XX =\> :run\_command  
ERROR: Failed to authenticate to [“192.168.XX.XX”] as administrator  
Response: Bad HTTP response returned from server (401).

Nikhil Shah / System Administrator  
[nshah@theorchard.com](mailto:nshah@theorchard.com)

The Orchard® / [www.theorchard.com](http://www.theorchard.com)

t (+1) 212.308.5648 / f (+1) 212.201.9203  
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / [www.dailyrindblog.com](http://www.dailyrindblog.com)  
Facebook / @orchtweets

Privileged And Confidential Communication.  
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and © are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

---

<div class="post-metadata">

**Author:** ![Paul\_Morton\_BIA](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/paul_morton_bia/32/480_2.png) [@Paul\_Morton\_BIA](https://discourse.chef.io/u/Paul_Morton_BIA)\
**Post date:** [September 18, 2013, 9:03pm UTC](https://discourse.chef.io/t/winrm/4471/2 "2013-09-18T21:03:42Z")

</div>

Nikhil - This typically means that you have the wrong username or password specified. 401 is un-authorized.

On Sep 18, 2013, at 2:03 PM, Nikhil Shah [nshah@theorchard.com](mailto:nshah@theorchard.com) wrote:

> Anyone seen this error message? I had it working (of course with the hosted solution); however, this is the first windows server I'm launching hosting my open source server in house:
> 
> ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> Response: Bad HTTP response returned from server (401).  
> DEBUG: Adding 192.168.XX.XX  
> DEBUG: :session =\> :init  
> DEBUG: :relay\_to\_servers =\> cmd.exe /C %TEMP%\bootstrap-5449-1379538020.bat  
> DEBUG: :relayed =\> 192.168.XX.XX  
> DEBUG: 192.168.XX.XX =\> :run\_command  
> ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> Response: Bad HTTP response returned from server (401).
> 
> Nikhil Shah / System Administrator  
> [nshah@theorchard.com](mailto:nshah@theorchard.com)
> 
> The Orchard® / [www.theorchard.com](http://www.theorchard.com)
> 
> t (+1) 212.308.5648 / f (+1) 212.201.9203  
> 23 E. 4th St., 3rd Fl / New York, NY 10003
> 
> The Daily Rind™ / [www.dailyrindblog.com](http://www.dailyrindblog.com)  
> Facebook / @orchtweets
> 
> Privileged And Confidential Communication.  
> This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

---

<div class="post-metadata">

**Author:** ![Nikhil\_Shah](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nikhil\_Shah](https://discourse.chef.io/u/Nikhil_Shah)\
**Post date:** [September 18, 2013, 9:04pm UTC](https://discourse.chef.io/t/winrm/4471/3 "2013-09-18T21:04:37Z")

</div>

thats very odd, b/c i copied and pasted into windows login and it works.

On Wed, Sep 18, 2013 at 5:03 PM, Paul Morton - BIA  
[pmorton@biaprotect.com](mailto:pmorton@biaprotect.com)wrote:

> Nikhil - This typically means that you have the wrong username or password  
> specified. 401 is un-authorized.
> 
> On Sep 18, 2013, at 2:03 PM, Nikhil Shah [nshah@theorchard.com](mailto:nshah@theorchard.com) wrote:
> 
> > Anyone seen this error message? I had it working (of course with the  
> > hosted solution); however, this is the first windows server I'm launching  
> > hosting my open source server in house:
> > 
> > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > Response: Bad HTTP response returned from server (401).  
> > DEBUG: Adding 192.168.XX.XX  
> > DEBUG: :session =\> :init  
> > DEBUG: :relay\_to\_servers =\> cmd.exe /C  
> > %TEMP%\bootstrap-5449-1379538020.bat  
> > DEBUG: :relayed =\> 192.168.XX.XX  
> > DEBUG: 192.168.XX.XX =\> :run\_command  
> > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > Response: Bad HTTP response returned from server (401).
> > 
> > Nikhil Shah / System Administrator  
> > [nshah@theorchard.com](mailto:nshah@theorchard.com)
> > 
> > The Orchard® / [www.theorchard.com](http://www.theorchard.com)
> > 
> > t (+1) 212.308.5648 / f (+1) 212.201.9203  
> > 23 E. 4th St., 3rd Fl / New York, NY 10003
> > 
> > The Daily Rind™ / [www.dailyrindblog.com](http://www.dailyrindblog.com)  
> > Facebook / @orchtweets
> > 
> > Privileged And Confidential Communication.  
> > This electronic transmission, and any documents attached hereto, (a) are  
> > protected by the Electronic Communications Privacy Act (18 USC §§  
> > 2510-2521), (b) may contain confidential and/or legally privileged  
> > information, and (c) are for the sole use of the intended recipient named  
> > above. If you have received this electronic message in error, please notify  
> > the sender and delete the electronic message. Any disclosure, copying,  
> > distribution, or use of the contents of the information received in error  
> > is strictly prohibited.

--

- Nikhil Shah \*/ System Administrator

[nshah@theorchard.com](mailto:nshah@theorchard.com)

_The Orchard®_ / [www.theorchard.com](http://www.theorchard.com)

t (+1) 212.308.5648 / f (+1) 212.201.9203  
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / _[www.dailyrindblog.com](http://www.dailyrindblog.com)_ [http://www.dailyrindblog.com/](http://www.dailyrindblog.com/)

_Facebook_ [http://www.facebook.com/theorchard](http://www.facebook.com/theorchard) /  
_@orchtweets_[http://www.twitter.com/orchtweets](http://www.twitter.com/orchtweets)

Privileged And Confidential Communication.

This electronic transmission, and any documents attached hereto, (a) are  
protected by the Electronic Communications Privacy Act (18 USC §§  
2510-2521), (b) may contain confidential and/or legally privileged  
information, and (c) are for the sole use of the intended recipient named  
above. If you have received this electronic message in error, please notify  
the sender and delete the electronic message. Any disclosure, copying,  
distribution, or use of the contents of the information received in error  
is strictly prohibited

---

<div class="post-metadata">

**Author:** ![Nikhil\_Shah](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nikhil\_Shah](https://discourse.chef.io/u/Nikhil_Shah)\
**Post date:** [September 18, 2013, 9:25pm UTC](https://discourse.chef.io/t/winrm/4471/4 "2013-09-18T21:25:41Z")

</div>

Could this be from misconfigured WinRM? I followed the instructions just as I did with previous servers. The only difference is now I am hosting the chef server vs. having it hosted.  
Nikhil Shah / System Administrator  
[nshah@theorchard.com](mailto:nshah@theorchard.com)

The Orchard® / [www.theorchard.com](http://www.theorchard.com)

t (+1) 212.308.5648 / f (+1) 212.201.9203  
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / [www.dailyrindblog.com](http://www.dailyrindblog.com)  
Facebook / @orchtweets

Privileged And Confidential Communication.  
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Sep 18, 2013, at 5:04 PM, Nikhil Shah [nshah@theorchard.com](mailto:nshah@theorchard.com) wrote:

> thats very odd, b/c i copied and pasted into windows login and it works.
> 
> On Wed, Sep 18, 2013 at 5:03 PM, Paul Morton - BIA [pmorton@biaprotect.com](mailto:pmorton@biaprotect.com) wrote:  
> Nikhil - This typically means that you have the wrong username or password specified. 401 is un-authorized.
> 
> On Sep 18, 2013, at 2:03 PM, Nikhil Shah [nshah@theorchard.com](mailto:nshah@theorchard.com) wrote:
> 
> > Anyone seen this error message? I had it working (of course with the hosted solution); however, this is the first windows server I'm launching hosting my open source server in house:
> > 
> > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > Response: Bad HTTP response returned from server (401).  
> > DEBUG: Adding 192.168.XX.XX  
> > DEBUG: :session =\> :init  
> > DEBUG: :relay\_to\_servers =\> cmd.exe /C %TEMP%\bootstrap-5449-1379538020.bat  
> > DEBUG: :relayed =\> 192.168.XX.XX  
> > DEBUG: 192.168.XX.XX =\> :run\_command  
> > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > Response: Bad HTTP response returned from server (401).
> > 
> > Nikhil Shah / System Administrator  
> > [nshah@theorchard.com](mailto:nshah@theorchard.com)
> > 
> > The Orchard® / [www.theorchard.com](http://www.theorchard.com)
> > 
> > t (+1) 212.308.5648 / f (+1) 212.201.9203  
> > 23 E. 4th St., 3rd Fl / New York, NY 10003
> > 
> > The Daily Rind™ / [www.dailyrindblog.com](http://www.dailyrindblog.com)  
> > Facebook / @orchtweets
> > 
> > Privileged And Confidential Communication.  
> > This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.
> 
> --  
> Nikhil Shah / System Administrator
> 
> [nshah@theorchard.com](mailto:nshah@theorchard.com)
> 
> The Orchard® / [www.theorchard.com](http://www.theorchard.com)
> 
> t (+1) 212.308.5648 / f (+1) 212.201.9203  
> 23 E. 4th St., 3rd Fl / New York, NY 10003
> 
> The Daily Rind™ / [www.dailyrindblog.com](http://www.dailyrindblog.com)
> 
> Facebook / @orchtweets
> 
> Privileged And Confidential Communication.
> 
> This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [September 18, 2013, 10:16pm UTC](https://discourse.chef.io/t/winrm/4471/5 "2013-09-18T22:16:53Z")

</div>

On Wednesday, September 18, 2013 at 2:03 PM, Paul Morton - BIA wrote:

> Nikhil - This typically means that you have the wrong username or password specified. 401 is un-authorized.
> 
> On Sep 18, 2013, at 2:03 PM, Nikhil Shah \<[nshah@theorchard.com](mailto:nshah@theorchard.com) ([mailto:nshah@theorchard.com](mailto:nshah@theorchard.com))\> wrote:
> 
> > Anyone seen this error message? I had it working (of course with the hosted solution); however, this is the first windows server I'm launching hosting my open source server in house:
> > 
> > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > Response: Bad HTTP response returned from server (401).  
> > DEBUG: Adding 192.168.XX.XX  
> > DEBUG: :session =\> :init  
> > DEBUG: :relay\_to\_servers =\> cmd.exe /C %TEMP%\bootstrap-5449-1379538020.bat  
> > DEBUG: :relayed =\> 192.168.XX.XX  
> > DEBUG: 192.168.XX.XX =\> :run\_command  
> > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > Response: Bad HTTP response returned from server (401).
> > 
> > Nikhil Shah / System Administrator

To clarify, your authentication credentials are being rejected by the Chef server. So either you have a bad client key or node name.

## To test things out with knife, you can try something like `knife node list -s CHEF_SERVER_URL -u CLIENT_NAME -k PATH_TO_CLIENT_KEY`

Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![BradKnowles](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bradknowles/32/99_2.png) [@BradKnowles](https://discourse.chef.io/u/BradKnowles)\
**Post date:** [September 18, 2013, 10:31pm UTC](https://discourse.chef.io/t/winrm/4471/6 "2013-09-18T22:31:13Z")

</div>

On Sep 18, 2013, at 4:25 PM, Nikhil Shah [nshah@theorchard.com](mailto:nshah@theorchard.com) wrote:

> Could this be from misconfigured WinRM? I followed the instructions just as I did with previous servers. The only difference is now I am hosting the chef server vs. having it hosted.

I've seen weird problems with WinRM. For example, see KNIFE-22 [1], KNIFE-298 [2], and KNIFE-337 [3].

[1] [https://tickets.opscode.com/browse/KNIFE-22](https://tickets.opscode.com/browse/KNIFE-22)  
[2] [https://tickets.opscode.com/browse/KNIFE-298](https://tickets.opscode.com/browse/KNIFE-298)  
[3] [https://tickets.opscode.com/browse/KNIFE-337](https://tickets.opscode.com/browse/KNIFE-337)

--  
Brad Knowles [brad@shub-internet.org](mailto:brad@shub-internet.org)  
LinkedIn Profile: [http://tinyurl.com/y8kpxu](http://tinyurl.com/y8kpxu)

---

<div class="post-metadata">

**Author:** ![Nikhil\_Shah](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nikhil\_Shah](https://discourse.chef.io/u/Nikhil_Shah)\
**Post date:** [September 18, 2013, 10:39pm UTC](https://discourse.chef.io/t/winrm/4471/7 "2013-09-18T22:39:33Z")

</div>

Daniel, that could be a possibility. I migrated from chef hosted to chef open source, I'll touch base with you tomorrow -

Thanks,

Nikhil Shah

On Sep 18, 2013, at 6:16 PM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:

> On Wednesday, September 18, 2013 at 2:03 PM, Paul Morton - BIA wrote:
> 
> > Nikhil - This typically means that you have the wrong username or password specified. 401 is un-authorized.
> > 
> > On Sep 18, 2013, at 2:03 PM, Nikhil Shah [nshah@theorchard.com](mailto:nshah@theorchard.com) wrote:
> > 
> > > Anyone seen this error message? I had it working (of course with the hosted solution); however, this is the first windows server I'm launching hosting my open source server in house:
> > > 
> > > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > > Response: Bad HTTP response returned from server (401).  
> > > DEBUG: Adding 192.168.XX.XX  
> > > DEBUG: :session =\> :init  
> > > DEBUG: :relay\_to\_servers =\> cmd.exe /C %TEMP%\bootstrap-5449-1379538020.bat  
> > > DEBUG: :relayed =\> 192.168.XX.XX  
> > > DEBUG: 192.168.XX.XX =\> :run\_command  
> > > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > > Response: Bad HTTP response returned from server (401).
> > > 
> > > Nikhil Shah / System Administrator
> 
> To clarify, your authentication credentials are being rejected by the Chef server. So either you have a bad client key or node name.
> 
> ## To test things out with knife, you can try something like `knife node list -s CHEF_SERVER_URL -u CLIENT_NAME -k PATH_TO_CLIENT_KEY`
> 
> Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Nikhil\_Shah](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nikhil\_Shah](https://discourse.chef.io/u/Nikhil_Shah)\
**Post date:** [September 19, 2013, 5:25pm UTC](https://discourse.chef.io/t/winrm/4471/8 "2013-09-19T17:25:48Z")

</div>

Daniel,

I think you got it. I believe when I ported over it messed with the permission of the client key. I was able to deploy a new server, ill try the ones I have been having issues with.  
Nikhil Shah / System Administrator  
[nshah@theorchard.com](mailto:nshah@theorchard.com)

The Orchard® / [www.theorchard.com](http://www.theorchard.com)

t (+1) 212.308.5648 / f (+1) 212.201.9203  
23 E. 4th St., 3rd Fl / New York, NY 10003

The Daily Rind™ / [www.dailyrindblog.com](http://www.dailyrindblog.com)  
Facebook / @orchtweets

Privileged And Confidential Communication.  
This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.

On Sep 18, 2013, at 6:16 PM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:

> On Wednesday, September 18, 2013 at 2:03 PM, Paul Morton - BIA wrote:
> 
> > Nikhil - This typically means that you have the wrong username or password specified. 401 is un-authorized.
> > 
> > On Sep 18, 2013, at 2:03 PM, Nikhil Shah [nshah@theorchard.com](mailto:nshah@theorchard.com) wrote:
> > 
> > > Anyone seen this error message? I had it working (of course with the hosted solution); however, this is the first windows server I'm launching hosting my open source server in house:
> > > 
> > > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > > Response: Bad HTTP response returned from server (401).  
> > > DEBUG: Adding 192.168.XX.XX  
> > > DEBUG: :session =\> :init  
> > > DEBUG: :relay\_to\_servers =\> cmd.exe /C %TEMP%\bootstrap-5449-1379538020.bat  
> > > DEBUG: :relayed =\> 192.168.XX.XX  
> > > DEBUG: 192.168.XX.XX =\> :run\_command  
> > > ERROR: Failed to authenticate to ["192.168.XX.XX"] as administrator  
> > > Response: Bad HTTP response returned from server (401).
> > > 
> > > Nikhil Shah / System Administrator
> 
> To clarify, your authentication credentials are being rejected by the Chef server. So either you have a bad client key or node name.
> 
> ## To test things out with knife, you can try something like `knife node list -s CHEF_SERVER_URL -u CLIENT_NAME -k PATH_TO_CLIENT_KEY`
> 
> Daniel DeLeo
