[chef] Re: Re: Re: Re: iis cookbook trouble


Chronological Thread 
  • From: Kenneth Barry < >
  • To: " " < >
  • Cc: Galen Emery < >
  • Subject: [chef] Re: Re: Re: Re: iis cookbook trouble
  • Date: Mon, 17 Nov 2014 07:35:56 -0800

Great questions.
4312 is the error you get when appcmd can't find the sections of schema that your refereing to in your command.
So, if you get everything correct, but fat fingered the "where" of it all, you get a 4312.
I have not run with -l debug, I assumed the "Ran ....." line was sufficient, i'll debug and see if I get something different.

I'll have to test and see what error i get with Powershell, but I know part of the problem is that Powershell is unwrapping some of the quotations (as it will), so I get a "you didn't form the command properly" error.(I'm making that error  verbage up) I believe it is something like "malformed indexer"

On Sun, Nov 16, 2014 at 9:15 AM, Peter Burkholder < " target="_blank"> > wrote:

Kenneth,

Have you looked up what 4312 return code is?
Have you run chef-client with '-l debug'? The iis cookbook should log the iis_config cmd prior to the shell_out.
What error do you get with PowerShell?

--Peter

On Fri, Nov 14, 2014 at 6:11 PM, Kenneth Barry < " target="_blank"> > wrote:
No dice. 
Repeating the chef run doesn't help.

On Fri, Nov 14, 2014 at 11:44 AM, Kenneth Barry < " target="_blank"> > wrote:
I like the idea. Honestly, I hadn't tried re-running it.
First, I will move it to the last command,
Then test, and re-run if neccessary.


On Fri, Nov 14, 2014 at 10:08 AM, Galen Emery < " target="_blank"> > wrote:
Kenneth,

What happens if you re-run the chef-client?  Here's an old ticket that implies this may be a timing issue: https://tickets.opscode.com/browse/COOK-4214

On Thu, Nov 13, 2014 at 8:57 PM, Kenneth Barry < " target="_blank"> > wrote:
If i run the following from the cmd prompt in windows, it works just fine:

C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/handlers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  /commit:apphost

I have a iis_config resource block. Getting an error, indicating my syntax is incorrect.  But note what the error says was run:

==> default: Ran 
C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/handlers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  /commit:apphost returned 4312

what gives?
The provider uses cmd, and I am assuming that means, "just as if you were to open the cmd prompt in windows"

FYI I get a similar error when trying the above command while in a powershell prompt.

Full error below:

==> default: ================================================================================
==> default: Error executing action `config` on resource 'iis_config[-section:system.webServer/handl
ers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  /commit:
apphost]'
==> default: ================================================================================

==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0, 183], but received '4312'
==> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.
webServer/handlers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE
LETE"  /commit:apphost ----
==> default: STDOUT: ERROR ( message:Cannot find requested collection element. )
==> default: STDERR:
==> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.we
bServer/handlers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE
TE"  /commit:apphost ----
==> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/handler
s /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  /commit:ap
phost returned 4312
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb
==> default:
==> default: 119:     iis_config cmd do
==> default: 120:         action :config
==> default: 121:     end
==> default: 122: end
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb:119:in `block i
n from_file'
==> default:
==> default: iis_config("-section:system.webServer/handlers /[name='ExtensionlessUrlHandler-Integrat
ed-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  /commit:apphost") do
==> default:   action [:config]
==> default:   retries 0
==> default:   retry_delay 2
==> default:   cookbook_name "tunein-iis"
==> default:   recipe_name "default"
==> default:   cfg_cmd "-section:system.webServer/handlers /[name='ExtensionlessUrlHandler-Integrate
d-4.0'].verb:\"GET,HEAD,POST,DEBUG,PUT,DELETE\"  /commit:apphost"
==> default:   returns [0, 183]
==> default: end
==> default:
==> default: [2014-11-13T22:22:03-06:00] INFO: Running queued delayed notifications before re-raisin
g exception
==> default: [2014-11-13T22:22:03-06:00] ERROR: Running exception handlers
==> default: [2014-11-13T22:22:03-06:00] ERROR: Exception handlers complete
==> default: [2014-11-13T22:22:03-06:00] FATAL: Stacktrace dumped to C:/var/chef/cache/chef-stacktra
ce.out
==> default: [2014-11-13T22:22:03-06:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: iis_config[-se
ction:system.webServer/handlers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST
,DEBUG,PUT,DELETE"  /commit:apphost] (tunein-iis::default line 119) had an error: Mixlib::ShellOut::
ShellCommandFailed: Expected process to exit with [0, 183], but received '4312'
==> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.
webServer/handlers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE
LETE"  /commit:apphost ----
==> default: STDOUT: ERROR ( message:Cannot find requested collection element. )
==> default: STDERR:
==> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.we
bServer/handlers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE
TE"  /commit:apphost ----
==> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.webServer/handler
s /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  /commit:ap
phost returned 4312
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

--

Kenneth Barry 

TuneIn | Build and Release Engineer



--



--

Kenneth Barry 

TuneIn | Build and Release Engineer



--

Kenneth Barry 

TuneIn | Build and Release Engineer




--

Kenneth Barry 

TuneIn | Build and Release Engineer
M: 409-673-0544



Archive powered by MHonArc 2.6.16.

§