# Completely failing with knife-windows + winrm

**URL:** <https://discourse.chef.io/t/completely-failing-with-knife-windows-winrm/3325>\
**Category:** Chef Infra (archive)\
**Created:** [November 21, 2012, 10:13pm UTC](https://discourse.chef.io/t/completely-failing-with-knife-windows-winrm/3325 "2012-11-21T22:13:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Blaine](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jeff_blaine/32/19_2.png) [@Jeff\_Blaine](https://discourse.chef.io/u/Jeff_Blaine)\
**Post date:** [November 21, 2012, 10:13pm UTC](https://discourse.chef.io/t/completely-failing-with-knife-windows-winrm/3325/1 "2012-11-21T22:13:30Z")

</div>

Does anyone have any success with knife-windows (0.5.10  
from ‘gem install’)? I’m royally failing, and knife’s  
-V argument is proving useless as usual.

$ knife bootstrap windows winrm [jblaine-win.our.org](http://jblaine-win.our.org) -x jblaine -R  
[OUR.ORG](http://OUR.ORG) -V --bootstrap-proxy [http://gatekeeper.our.org:80/](http://gatekeeper.our.org:80/)  
Bootstrapping Chef on [jblaine-win.our.org](http://jblaine-win.our.org)  
[jblaine-win.our.org](http://jblaine-win.our.org) "Rendering  
’C:\Users\JBLAIN~1.OUR\AppData\Local\Temp\bootstrap-5398-1353533929.bat’  
chunk 1"  
ERROR: TypeError: can’t convert nil into String

Remarkably, if I go find the batch file on jblaine-win and run  
it, it works fine.

Let’s see if I can do anything?

knife winrm jblaine-win.our.org "net use \*" -m -x jblaine -R OUR.ORG -V ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes a retry will solve this error. knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) “net use \*” -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
a retry will solve this error.  
$ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) “net use \*” -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
a retry will solve this error.

---

<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:** [November 21, 2012, 10:20pm UTC](https://discourse.chef.io/t/completely-failing-with-knife-windows-winrm/3325/2 "2012-11-21T22:20:02Z")

</div>

On Wednesday, November 21, 2012 at 2:13 PM, Jeff Blaine wrote:

> Does anyone have any success with knife-windows (0.5.10  
> from 'gem install')? I'm royally failing, and knife's  
> -V argument is proving useless as usual.
> 
> $ knife bootstrap windows winrm [jblaine-win.our.org](http://jblaine-win.our.org) ([http://jblaine-win.our.org](http://jblaine-win.our.org)) -x jblaine -R  
> [OUR.ORG](http://OUR.ORG) -V --bootstrap-proxy [http://gatekeeper.our.org:80/](http://gatekeeper.our.org:80/)  
> Bootstrapping Chef on [jblaine-win.our.org](http://jblaine-win.our.org) ([http://jblaine-win.our.org](http://jblaine-win.our.org))  
> [jblaine-win.our.org](http://jblaine-win.our.org) ([http://jblaine-win.our.org](http://jblaine-win.our.org)) "Rendering  
> 'C:\Users\JBLAIN~1.OUR\AppData\Local\Temp\bootstrap-5398-1353533929.bat'  
> chunk 1"  
> ERROR: TypeError: can't convert nil into String
> 
> Remarkably, if I go find the batch file on jblaine-win and run  
> it, it works fine.
> 
> Let's see if I can do anything?
> 
> $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) ([http://jblaine-win.our.org](http://jblaine-win.our.org)) "net use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
> a retry will solve this error.  
> $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) ([http://jblaine-win.our.org](http://jblaine-win.our.org)) "net use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
> a retry will solve this error.  
> $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) ([http://jblaine-win.our.org](http://jblaine-win.our.org)) "net use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
> a retry will solve this error.

What version of windows is this?

## Also, you can give knife the `-V` argument twice for more information, but this won't help if the winrm library doesn't provide more debug output or knife-winrm isn't wired up to increase winrm's verbosity.

Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Jeff\_Blaine](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jeff_blaine/32/19_2.png) [@Jeff\_Blaine](https://discourse.chef.io/u/Jeff_Blaine)\
**Post date:** [November 21, 2012, 10:33pm UTC](https://discourse.chef.io/t/completely-failing-with-knife-windows-winrm/3325/3 "2012-11-21T22:33:09Z")

</div>

On 11/21/2012 5:20 PM, Daniel DeLeo wrote:

> On Wednesday, November 21, 2012 at 2:13 PM, Jeff Blaine wrote:
> 
> > Does anyone have any success with knife-windows (0.5.10  
> > from 'gem install')? I'm royally failing, and knife's  
> > -V argument is proving useless as usual.
> > 
> > $ knife bootstrap windows winrm [jblaine-win.our.org](http://jblaine-win.our.org)  
> > [http://jblaine-win.our.org](http://jblaine-win.our.org) -x jblaine -R  
> > [OUR.ORG](http://OUR.ORG) -V --bootstrap-proxy [http://gatekeeper.our.org:80/](http://gatekeeper.our.org:80/)  
> > Bootstrapping Chef on [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org)  
> > [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "Rendering  
> > 'C:\Users\JBLAIN~1.OUR\AppData\Local\Temp\bootstrap-5398-1353533929.bat'  
> > chunk 1"  
> > ERROR: TypeError: can't convert nil into String
> > 
> > Remarkably, if I go find the batch file on jblaine-win and run  
> > it, it works fine.
> > 
> > Let's see if I can do anything?
> > 
> > $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "net  
> > use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> > ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
> > a retry will solve this error.  
> > $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "net  
> > use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> > ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
> > a retry will solve this error.  
> > $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "net  
> > use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> > ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
> > a retry will solve this error.
> 
> What version of windows is this?

Windows 2008 Server R2

> Also, you can give knife the `-V` argument twice for more information,  
> but this won't help if the winrm library doesn't provide more debug  
> output or knife-winrm isn't wired up to increase winrm's verbosity.

Handy. Thanks.

Here's the latest with -VV.

knife bootstrap windows winrm [jblaine-win.our.org](http://jblaine-win.our.org) -x jblaine -R [OUR.ORG](http://OUR.ORG)  
-VV --bootstrap-proxy [http://gatekeeper.our.org:80/](http://gatekeeper.our.org:80/)  
...stuff...  
DEBUG: Adding [jblaine-win.our.org](http://jblaine-win.our.org)  
DEBUG: :session =\> :init  
DEBUG: :relay\_to\_servers =\> cmd.exe /C echo "Rendering  
'%TEMP%\bootstrap-7422-1353536911.bat' chunk 5" && \>\>  
%TEMP%\bootstrap-7422-1353536911.bat  
(echo.echo.rU3sMcdSuHVB9pSTUFF...du0gkPTv2N0) && \>\>  
%TEMP%\bootstrap-7422-1353536911.bat  
(echo.echo.hAH8BV2e3+0eJSTUFF...ni/hRCC) && \>\>  
%TEMP%\bootstrap-7422-1353536911.bat  
(echo.echo.mpic27OBPcDNxdobwNKSTUFF...OFBgSr2Wjo5WyDg) && \>\>  
%TEMP%\bootstrap-7422-1353536911.bat  
(echo.echo.3j8k2ZOFAlVxiDVSJoTSTUFF...gIufxu7PiXzq50) && \>\>  
%TEMP%\bootstrap-7422-1353536911.bat  
(echo.echo.7/9kgETRB75wdeiwlzSTUFF...xJfhGb0nD/y4j) && \>\>  
%TEMP%\bootstrap-7422-1353536911.bat  
(echo.echo.SwtNrxz4OwXSTUFF...Qu69UkMAFT9G) && \>\>  
%TEMP%\bootstrap-7422-1353536911.bat  
(echo.echo.4HezEwKBgQCIs4NSTUFF...qPlpZnHGNaG) && \>\>  
%TEMP%\bootstrap-7422-1353536911.bat  
(echo.echo.NzurCPfdKduWSTUFF...D6EeGTTLDrRFS) && \>\>  
%TEMP%\bootstrap-7422-1353536911.bat  
(echo.echo.AIPOQPZ/ah7p7n2CMUZTS+eBfHWTcT/Giz6ML9G15qcO68m0jRTTAQ==) &&

> > %TEMP%\bootstrap-7422-1353536911.bat (echo.echo.-----END RSA PRIVATE  
> > KEY-----) && \>\> %TEMP%\bootstrap-7422-1353536911.bat (echo.) && \>\>  
> > %TEMP%\bootstrap-7422-1353536911.bat (echo.^)) && \>\>  
> > %TEMP%\bootstrap-7422-1353536911.bat (echo.) && \>\>  
> > %TEMP%\bootstrap-7422-1353536911.bat (echo.) && \>\>  
> > %TEMP%\bootstrap-7422-1353536911.bat (echo.^\> C:\chef\client.rb ^() &&  
> > %TEMP%\bootstrap-7422-1353536911.bat (echo.echo.log\_level  
> > :info) && \>\> %TEMP%\bootstrap-7422-1353536911.bat  
> > (echo.echo.log\_location STDOUT) && \>\>  
> > %TEMP%\bootstrap-7422-1353536911.bat (echo.echo.) && \>\>  
> > %TEMP%\bootstrap-7422-1353536911.bat (echo.echo.chef\_server\_url  
> > "[http://rcf-cm-master.our.org:4000](http://rcf-cm-master.our.org:4000)") && \>\>  
> > %TEMP%\bootstrap-7422-1353536911.bat (echo.echo.validation\_client\_name  
> > "chef-validator") && \>\> %TEMP%\bootstrap-7422-1353536911.bat  
> > (echo.echo.client\_key "c:/chef/client.pem") && \>\>  
> > %TEMP%\bootstrap-7422-1353536911.bat (echo.echo.validation\_key  
> > "c:/chef/validation.pem")  
> > DEBUG: :relayed =\> [jblaine-win.our.org](http://jblaine-win.our.org)  
> > DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org) =\> :run\_command  
> > DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org)[8DC6AEEA-C139-4587-AABF-23BCEF83D936] =\>  
> > :shell\_open  
> > ERROR: TypeError: can't convert nil into String

And then:

$ knife winrm '[jblaine-win.our.org](http://jblaine-win.our.org)' "net use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -VV  
DEBUG: Using configuration from /home/jblaine/.chef/knife.rb  
DEBUG: Adding [jblaine-win.our.org](http://jblaine-win.our.org)  
DEBUG: :session =\> :init  
DEBUG: :relay\_to\_servers =\> net use \*  
DEBUG: :relayed =\> [jblaine-win.our.org](http://jblaine-win.our.org)  
DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org) =\> :run\_command  
DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org)[DD0618B7-575A-4608-8B6C-736EA72381BF] =\>  
:shell\_open  
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/winrm-1.1.2/lib/winrm/winrm\_service.rb:382:in  
`rescue in send_message': Bad SOAP Packet returned. Sometimes a retry will solve this error. (WinRM::WinRMWebServiceError) from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/winrm-1.1.2/lib/winrm/winrm_service.rb:370:in `send\_message'  
from  
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/winrm-1.1.2/lib/winrm/winrm\_service.rb:136:in  
`run_command' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/em-winrm-0.5.4/lib/em-winrm/shell.rb:60:in `run\_command'  
from  
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/em-winrm-0.5.4/lib/em-winrm/server.rb:58:in  
`block (2 levels) in run_command' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.3/lib/eventmachine.rb:1009:in `call'  
from  
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.3/lib/eventmachine.rb:1009:in  
`block in spawn\_threadpool'

---

<div class="post-metadata">

**Author:** ![Chirag\_Jog](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/chirag_jog/32/450_2.png) [@Chirag\_Jog](https://discourse.chef.io/u/Chirag_Jog)\
**Post date:** [November 22, 2012, 5:16am UTC](https://discourse.chef.io/t/completely-failing-with-knife-windows-winrm/3325/4 "2012-11-22T05:16:06Z")

</div>

Hello Jeff,  
Since you are using Kerberos for authentication, has the source  
machine(assuming linux) on which you are running the knife commands been  
pre-authentication with the AD?

Also it is always useful to check if every works fine with Basic  
Authentication mode if possible.

Regards\*,\*  
_Chirag Jog_  
Chief Technology Officer,  
_Clogeny Technologies_ | [http://clogeny.com](http://clogeny.com)  
(M) 0091-9766619440 | Skype: chirag.jog

On Thu, Nov 22, 2012 at 4:03 AM, Jeff Blaine [jblaine@kickflop.net](mailto:jblaine@kickflop.net) wrote:

> On 11/21/2012 5:20 PM, Daniel DeLeo wrote:
> 
> > On Wednesday, November 21, 2012 at 2:13 PM, Jeff Blaine wrote:
> > 
> > Does anyone have any success with knife-windows (0.5.10
> > 
> > > from 'gem install')? I'm royally failing, and knife's  
> > > -V argument is proving useless as usual.
> > > 
> > > $ knife bootstrap windows winrm [jblaine-win.our.org](http://jblaine-win.our.org)  
> > > [http://jblaine-win.our.org](http://jblaine-win.our.org) -x jblaine -R
> > > 
> > > [OUR.ORG](http://OUR.ORG) -V --bootstrap-proxy [http://gatekeeper.our.org:80/](http://gatekeeper.our.org:80/)  
> > > Bootstrapping Chef on [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org)  
> > > [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "Rendering
> > > 
> > > 'C:\Users\JBLAIN~1.OUR\*_AppData\Local\Temp\bootstrap-_\*  
> > > 5398-1353533929.bat'  
> > > chunk 1"  
> > > ERROR: TypeError: can't convert nil into String
> > > 
> > > Remarkably, if I go find the batch file on jblaine-win and run  
> > > it, it works fine.
> > > 
> > > Let's see if I can do anything?
> > > 
> > > $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "net
> > > 
> > > use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> > > ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
> > > a retry will solve this error.  
> > > $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "net
> > > 
> > > use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> > > ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
> > > a retry will solve this error.  
> > > $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "net
> > > 
> > > use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> > > ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned. Sometimes  
> > > a retry will solve this error.
> > 
> > What version of windows is this?
> 
> Windows 2008 Server R2
> 
> Also, you can give knife the `-V` argument twice for more information,
> 
> > but this won't help if the winrm library doesn't provide more debug  
> > output or knife-winrm isn't wired up to increase winrm's verbosity.
> 
> Handy. Thanks.
> 
> Here's the latest with -VV.
> 
> knife bootstrap windows winrm [jblaine-win.our.org](http://jblaine-win.our.org) -x jblaine -R OUR.ORG-VV --bootstrap-proxy  
> [http://gatekeeper.our.org:80/](http://gatekeeper.our.org:80/)  
> ...stuff...  
> DEBUG: Adding [jblaine-win.our.org](http://jblaine-win.our.org)  
> DEBUG: :session =\> :init  
> DEBUG: :relay\_to\_servers =\> cmd.exe /C echo "Rendering  
> '%TEMP%\bootstrap-7422-\*\*1353536911.bat' chunk 5" && \>\>  
> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.\*\*rU3sMcdSuHVB9pSTUFF...  
> \*\*du0gkPTv2N0) && \>\> %TEMP%\bootstrap-7422-**1353536911.bat  
> (echo.echo.hAH8BV2e3+0eJSTUFF.**..ni/hRCC) && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat  
> (echo.echo.\*\*mpic27OBPcDNxdobwNKSTUFF...\*\*OFBgSr2Wjo5WyDg) && \>\>  
> %TEMP%\bootstrap-7422-**1353536911.bat (echo.echo.**  
> 3j8k2ZOFAlVxiDVSJoTSTUFF...\*_gIufxu7PiXzq50) && \>\> %TEMP%\bootstrap-7422-_  
> \*1353536911.bat (echo.echo.7/\*\*9kgETRB75wdeiwlzSTUFF...\*\*xJfhGb0nD/y4j)  
> && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat  
> (echo.echo.SwtNrxz4OwXSTUFF...\*\*Qu69UkMAFT9G) && \>\> %TEMP%\bootstrap-7422-  
> \*\*1353536911.bat (echo.echo.\*\*4HezEwKBgQCIs4NSTUFF...\*\*qPlpZnHGNaG) && \>\>  
> %TEMP%\bootstrap-7422-**1353536911.bat (echo.echo.NzurCPfdKduWSTUFF..**.D6EeGTTLDrRFS)  
> && \>\> %TEMP%\bootstrap-7422-**1353536911.bat (echo.echo.AIPOQPZ/**  
> ah7p7n2CMUZTS+eBfHWTcT/\*\*Giz6ML9G15qcO68m0jRTTAQ==) && \>\>  
> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.-----END RSA PRIVATE  
> KEY-----) && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.) && \>\>  
> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.^)) && \>\>  
> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.) && \>\>  
> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.) && \>\>  
> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.^\> C:\chef\client.rb ^() &&
> 
> > > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.log\_level :info) &&  
> > > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.log\_location  
> > > STDOUT) && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.) && \>\>  
> > > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.chef\_server\_url "  
> > > [http://rcf-cm-master.our.org](http://rcf-cm-master.our.org):\*\*4000 [http://rcf-cm-master.our.org:4000](http://rcf-cm-master.our.org:4000)")  
> > > && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.validation\_client\_  
> > > \*\*name "chef-validator") && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat  
> > > (echo.echo.client\_key "c:/chef/client.pem") && \>\>  
> > > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.validation\_key  
> > > "c:/chef/validation.pem")  
> > > DEBUG: :relayed =\> [jblaine-win.our.org](http://jblaine-win.our.org)  
> > > DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org) =\> :run\_command  
> > > DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org)[8DC6AEEA-\*\*C139-4587-AABF-23BCEF83D936] =\>  
> > > :shell\_open
> 
> ERROR: TypeError: can't convert nil into String
> 
> And then:
> 
> $ knife winrm '[jblaine-win.our.org](http://jblaine-win.our.org)' "net use \*" -m -x jblaine -R OUR.ORG-VV  
> DEBUG: Using configuration from /home/jblaine/.chef/knife.rb  
> DEBUG: Adding [jblaine-win.our.org](http://jblaine-win.our.org)  
> DEBUG: :session =\> :init  
> DEBUG: :relay\_to\_servers =\> net use \*  
> DEBUG: :relayed =\> [jblaine-win.our.org](http://jblaine-win.our.org)  
> DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org) =\> :run\_command  
> DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org)[DD0618B7-\*\*575A-4608-8B6C-736EA72381BF] =\>  
> :shell\_open  
> /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/winrm-1.1.2/**  
> lib/winrm/winrm\_service.rb:\*\*382:in `rescue in send_message': Bad SOAP Packet returned. Sometimes a retry will solve this error. (WinRM::WinRMWebServiceError) from /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/winrm-1.1.2/** lib/winrm/winrm_service.rb:**370:in `send\_message'  
> from /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/winrm-1.1.2/**  
> lib/winrm/winrm\_service.rb:\*\*136:in `run_command' from /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/em-winrm-0.5.** 4/lib/em-winrm/shell.rb:60:in `run\_command'  
> from /opt/chef/embedded/lib/ruby/\*\*gems/1.9.1/gems/em-winrm-0.5.\*\*4/lib/em-winrm/server.rb:58:in  
> `block (2 levels) in run_command' from /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/eventmachine-** 1.0.0.beta.3/lib/eventmachine.**rb:1009:in `call'  
> from /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/eventmachine-**  
> 1.0.0.beta.3/lib/eventmachine.\*\*rb:1009:in `block in spawn\_threadpool'

---

<div class="post-metadata">

**Author:** ![Jeff\_Blaine](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jeff_blaine/32/19_2.png) [@Jeff\_Blaine](https://discourse.chef.io/u/Jeff_Blaine)\
**Post date:** [November 22, 2012, 11:18pm UTC](https://discourse.chef.io/t/completely-failing-with-knife-windows-winrm/3325/5 "2012-11-22T23:18:46Z")

</div>

Yes, I have authenticated locally. The batch file is written out to the Window's system's disk, so we're past auth.

Pardon the top-reply. Mail app I am using won't allow otherwise.

Chirag Jog [chirag@clogeny.com](mailto:chirag@clogeny.com) wrote:

> Hello Jeff,  
> Since you are using Kerberos for authentication, has the source  
> machine(assuming linux) on which you are running the knife commands  
> been  
> pre-authentication with the AD?
> 
> Also it is always useful to check if every works fine with Basic  
> Authentication mode if possible.
> 
> Regards\*,\*  
> _Chirag Jog_  
> Chief Technology Officer,  
> _Clogeny Technologies_ | [http://clogeny.com](http://clogeny.com)  
> (M) 0091-9766619440 | Skype: chirag.jog
> 
> On Thu, Nov 22, 2012 at 4:03 AM, Jeff Blaine [jblaine@kickflop.net](mailto:jblaine@kickflop.net)  
> wrote:
> 
> > On 11/21/2012 5:20 PM, Daniel DeLeo wrote:
> > 
> > > On Wednesday, November 21, 2012 at 2:13 PM, Jeff Blaine wrote:
> > > 
> > > Does anyone have any success with knife-windows (0.5.10
> > > 
> > > > from 'gem install')? I'm royally failing, and knife's  
> > > > -V argument is proving useless as usual.
> > > > 
> > > > $ knife bootstrap windows winrm [jblaine-win.our.org](http://jblaine-win.our.org)  
> > > > [http://jblaine-win.our.org](http://jblaine-win.our.org) -x jblaine -R
> > > > 
> > > > [OUR.ORG](http://OUR.ORG) -V --bootstrap-proxy [http://gatekeeper.our.org:80/](http://gatekeeper.our.org:80/)  
> > > > Bootstrapping Chef on [jblaine-win.our.org](http://jblaine-win.our.org)  
> > > > [http://jblaine-win.our.org](http://jblaine-win.our.org)  
> > > > [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "Rendering
> > > > 
> > > > 'C:\Users\JBLAIN~1.OUR\*_AppData\Local\Temp\bootstrap-_\*  
> > > > 5398-1353533929.bat'  
> > > > chunk 1"  
> > > > ERROR: TypeError: can't convert nil into String
> > > > 
> > > > Remarkably, if I go find the batch file on jblaine-win and run  
> > > > it, it works fine.
> > > > 
> > > > Let's see if I can do anything?
> > > > 
> > > > $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "net
> > > > 
> > > > use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> > > > ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned.  
> > > > Sometimes  
> > > > a retry will solve this error.  
> > > > $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "net
> > > > 
> > > > use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> > > > ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned.  
> > > > Sometimes  
> > > > a retry will solve this error.  
> > > > $ knife winrm [jblaine-win.our.org](http://jblaine-win.our.org) [http://jblaine-win.our.org](http://jblaine-win.our.org) "net
> > > > 
> > > > use \*" -m -x jblaine -R [OUR.ORG](http://OUR.ORG) -V  
> > > > ERROR: WinRM::WinRMWebServiceError: Bad SOAP Packet returned.  
> > > > Sometimes  
> > > > a retry will solve this error.
> > > 
> > > What version of windows is this?
> > 
> > Windows 2008 Server R2
> > 
> > Also, you can give knife the `-V` argument twice for more  
> > information,
> > 
> > > but this won't help if the winrm library doesn't provide more debug  
> > > output or knife-winrm isn't wired up to increase winrm's verbosity.
> > 
> > Handy. Thanks.
> > 
> > Here's the latest with -VV.
> > 
> > knife bootstrap windows winrm [jblaine-win.our.org](http://jblaine-win.our.org) -x jblaine -R  
> > OUR.ORG-VV --bootstrap-proxy  
> > [http://gatekeeper.our.org:80/](http://gatekeeper.our.org:80/)  
> > ...stuff...  
> > DEBUG: Adding [jblaine-win.our.org](http://jblaine-win.our.org)  
> > DEBUG: :session =\> :init  
> > DEBUG: :relay\_to\_servers =\> cmd.exe /C echo "Rendering  
> > '%TEMP%\bootstrap-7422-\*\*1353536911.bat' chunk 5" && \>\>  
> > %TEMP%\bootstrap-7422-\*\*1353536911.bat  
> > (echo.echo.\*\*rU3sMcdSuHVB9pSTUFF...  
> > \*\*du0gkPTv2N0) && \>\> %TEMP%\bootstrap-7422-**1353536911.bat  
> > (echo.echo.hAH8BV2e3+0eJSTUFF.**..ni/hRCC) && \>\>  
> > %TEMP%\bootstrap-7422-\*\*1353536911.bat  
> > (echo.echo.\*\*mpic27OBPcDNxdobwNKSTUFF...\*\*OFBgSr2Wjo5WyDg) && \>\>  
> > %TEMP%\bootstrap-7422-**1353536911.bat (echo.echo.**  
> > 3j8k2ZOFAlVxiDVSJoTSTUFF...\*_gIufxu7PiXzq50) && \>\>  
> > %TEMP%\bootstrap-7422-_  
> > \*1353536911.bat  
> > (echo.echo.7/\*\*9kgETRB75wdeiwlzSTUFF...\*\*xJfhGb0nD/y4j)  
> > && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat  
> > (echo.echo.SwtNrxz4OwXSTUFF...\*\*Qu69UkMAFT9G) && \>\>  
> > %TEMP%\bootstrap-7422-  
> > \*\*1353536911.bat (echo.echo.\*\*4HezEwKBgQCIs4NSTUFF...\*\*qPlpZnHGNaG)  
> > && \>\>  
> > %TEMP%\bootstrap-7422-**1353536911.bat  
> > (echo.echo.NzurCPfdKduWSTUFF..**.D6EeGTTLDrRFS)  
> > && \>\> %TEMP%\bootstrap-7422-**1353536911.bat (echo.echo.AIPOQPZ/**  
> > ah7p7n2CMUZTS+eBfHWTcT/\*\*Giz6ML9G15qcO68m0jRTTAQ==) && \>\>  
> > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.-----END RSA  
> > PRIVATE  
> > KEY-----) && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.) && \>\>  
> > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.^)) && \>\>  
> > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.) && \>\>  
> > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.) && \>\>  
> > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.^\> C:\chef\client.rb ^()  
> > &&
> > 
> > > > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.log\_level :info)  
> > > > &&  
> > > > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.log\_location  
> > > > STDOUT) && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.) &&
> > 
> > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.chef\_server\_url "  
> > [http://rcf-cm-master.our.org](http://rcf-cm-master.our.org):\*\*4000  
> > [http://rcf-cm-master.our.org:4000](http://rcf-cm-master.our.org:4000)")  
> > && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat  
> > (echo.echo.validation\_client\_  
> > \*\*name "chef-validator") && \>\> %TEMP%\bootstrap-7422-\*\*1353536911.bat  
> > (echo.echo.client\_key "c:/chef/client.pem") && \>\>  
> > %TEMP%\bootstrap-7422-\*\*1353536911.bat (echo.echo.validation\_key  
> > "c:/chef/validation.pem")  
> > DEBUG: :relayed =\> [jblaine-win.our.org](http://jblaine-win.our.org)  
> > DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org) =\> :run\_command  
> > DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org)[8DC6AEEA-\*\*C139-4587-AABF-23BCEF83D936] =\>  
> > :shell\_open
> > 
> > ERROR: TypeError: can't convert nil into String
> > 
> > And then:
> > 
> > $ knife winrm '[jblaine-win.our.org](http://jblaine-win.our.org)' "net use \*" -m -x jblaine -R  
> > OUR.ORG-VV  
> > DEBUG: Using configuration from /home/jblaine/.chef/knife.rb  
> > DEBUG: Adding [jblaine-win.our.org](http://jblaine-win.our.org)  
> > DEBUG: :session =\> :init  
> > DEBUG: :relay\_to\_servers =\> net use \*  
> > DEBUG: :relayed =\> [jblaine-win.our.org](http://jblaine-win.our.org)  
> > DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org) =\> :run\_command  
> > DEBUG: [jblaine-win.our.org](http://jblaine-win.our.org)[DD0618B7-\*\*575A-4608-8B6C-736EA72381BF] =\>  
> > :shell\_open  
> > /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/winrm-1.1.2/**  
> > lib/winrm/winrm\_service.rb:\*\*382:in `rescue in send_message': Bad SOAP Packet returned. Sometimes a retry will solve this error. (WinRM::WinRMWebServiceError) from /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/winrm-1.1.2/** lib/winrm/winrm_service.rb:**370:in `send\_message'  
> > from  
> > /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/winrm-1.1.2/**  
> > lib/winrm/winrm\_service.rb:\*\*136:in `run_command' from /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/em-winrm-0.5.** 4/lib/em-winrm/shell.rb:60:in `run\_command'  
> > from  
> > /opt/chef/embedded/lib/ruby/\*\*gems/1.9.1/gems/em-winrm-0.5.\*\*4/lib/em-winrm/server.rb:58:in  
> > `block (2 levels) in run_command' from /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/eventmachine-** 1.0.0.beta.3/lib/eventmachine.**rb:1009:in `call'  
> > from  
> > /opt/chef/embedded/lib/ruby/ **gems/1.9.1/gems/eventmachine-**  
> > 1.0.0.beta.3/lib/eventmachine.\*\*rb:1009:in `block in  
> > spawn\_threadpool'

--  
Sent from Kaiten Mail. Please excuse my brevity.
