Hey Rob,

Thanks for the response!

Yes – chocolatey version 0.9.8.23 is installed on both servers (found via
choco version).  They both respond to choco /?.  This is a customized
version that has had the install path modified and the default repository
restricted to an internal Nuget repository.

I can also install chocolatey packages manually on both servers –
specifically this package that is failing by typing “cinst carbon”.

I am running puppet as a windows service and ran the service with
debug/trace (sc start puppet –debug –trace) to pull the previous errors
from the event log, though they were a bit segregated across event entries.

It's also worth noting that there are 4 resource types ahead of the one
that's failing.  The 4 resourcs types (two files and two execs) are applied
successfully.  I ran the puppet agent –td –verbose –trace and received a
lot of output, but essentially the same errors that don't appear to have
any new information.   The successful output shows that the 4 previous
resource types ran.

Included below is the start of when it begins to apply the package with the
chocolatey provider:

Notice:
/Stage[main]/Copy_externalfacts/Exec[BuildStatusFacterFile_SetPerms]/returns:
executed successfully
Debug:
/Stage[main]/Copy_externalfacts/Exec[BuildStatusFacterFile_SetPerms]: The
container Class[Copy_externalfacts] will propagate my refresh event
Debug: Class[Copy_externalfacts]: The container Stage[main] will propagate
my refresh event
Debug: Prefetching chocolatey resources for package
Debug: Executing 'C:\Tools\Chocolatey\chocolateyInstall\chocolatey.cmd list
-lo'
Error: Could not prefetch package provider 'chocolatey': undefined method
`each' for nil:NilClass
C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:4:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:277:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:167:in
`prefetch_if_necessary'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:67:in `block in evaluate'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in `call'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in
`traverse'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:108:in `evaluate'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:164:in `block in
apply'
C:/Tools/Puppet/puppet/lib/puppet/util/log.rb:149:in `with_destination'
C:/Tools/Puppet/puppet/lib/puppet/transaction/report.rb:108:in
`as_logging_destination'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:163:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:125:in `block in
apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:161:in `block in benchmark'
C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:160:in `benchmark'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:124:in `apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:192:in `run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (4 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent/locker.rb:20:in `lock'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (3 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:114:in `with_client'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:41:in `block (2 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:79:in `run_in_fork'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:40:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `call'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `controlled_run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:38:in `run'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:355:in `onetime'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:321:in `run_command'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block (2 levels)
in run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:470:in `plugin_hook'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:478:in `exit_on_fail'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:137:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:91:in `execute'
C:/Tools/Puppet/puppet/bin/puppet:4:in `<main>'
Debug: Executing 'C:\Tools\Chocolatey\chocolateyInstall\chocolatey.cmd list
-lo'
Error: /Stage[main]/Install_carbon/Package[carbon]: Could not evaluate:
undefined method `each' for nil:NilClass
C:/ProgramData/PuppetLabs/puppet/var/lib/puppet/provider/package/chocolatey.rb:66:in
`query'
C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:19:in `properties'
C:/Tools/Puppet/puppet/lib/puppet/type/package.rb:178:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1035:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1063:in `retrieve_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:223:in
`from_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:19:in
`evaluate'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:174:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:187:in `eval_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `call'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `block (2 levels)
in evaluate'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:327:in `block in thinmark'
C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:326:in `thinmark'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `block in evaluate'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:118:in
`traverse'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:108:in `evaluate'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:164:in `block in
apply'
C:/Tools/Puppet/puppet/lib/puppet/util/log.rb:149:in `with_destination'
C:/Tools/Puppet/puppet/lib/puppet/transaction/report.rb:108:in
`as_logging_destination'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:163:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:125:in `block in
apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:161:in `block in benchmark'
C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:160:in `benchmark'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:124:in `apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:192:in `run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (4 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent/locker.rb:20:in `lock'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (3 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:114:in `with_client'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:41:in `block (2 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:79:in `run_in_fork'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:40:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `call'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `controlled_run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:38:in `run'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:355:in `onetime'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:321:in `run_command'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block (2 levels)
in run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:470:in `plugin_hook'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:478:in `exit_on_fail'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:137:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:91:in `execute'
C:/Tools/Puppet/puppet/bin/puppet:4:in `<main>'
Notice: /Stage[main]/Install_iis/Windowsfeature[IIS]/Exec[add-feature-IIS]:
Dependency Package[carbon] has failures: true
Warning:
/Stage[main]/Install_iis/Windowsfeature[IIS]/Exec[add-feature-IIS]:
Skipping because of failed dependencies

(list of failed dependencies go on)





On Tue, Jun 17, 2014 at 4:15 PM, Rob Reynolds <[email protected]> wrote:

> Let's make sure everything is set up correctly. Do you have chocolatey
> (the client tool) already installed on both of those servers? If so what
> versions of chocolatey?
>
> Do they both respond to output? (choco /?)
>
> Moving up the chain to the provider, let's execute puppet agent -td
> --verbose --trace
> This should really get us to what might be causing the error.
>
>
>
> On Tue, Jun 17, 2014 at 12:51 PM, Jim Ficarra <[email protected]>
> wrote:
>
>> Chocolatey is installed as a shared module on the puppet master. Below is
>> the specific part of the puppet code that uses the chocolatey provider to
>> install a custom package.
>>
>>
>> class install_carbon {
>>  package {'carbon':
>>  ensure => '1.7',
>>  provider => 'chocolatey',
>>   }
>> }
>>
>>
>> This class is part of a larger set of modules and classes that work
>> together and execute completely and successfully on another host but fails
>> on a second host with the error below.  Same puppet client version (3.4.2
>> installed from an internal NuGet repo).  Chocolatey is also customized to
>> point to an internal repo.
>>
>> Any help/thoughts/insight would be appreciated.
>>
>> Thanks!
>>
>> Could not prefetch package provider 'chocolatey': undefined method `each'
>> for nil:NilClass
>> C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:4:in `prefetch'
>> C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:277:in `prefetch'
>> C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:167:in
>> `prefetch_if_necessary'
>> C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:67:in `block in evaluate'
>> C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in
>> `call'
>> C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in
>> `traverse'
>> C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:108:in `evaluate'
>> C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:164:in `block in
>> apply'
>> C:/Tools/Puppet/puppet/lib/puppet/util/log.rb:149:in `with_destination'
>> C:/Tools/Puppet/puppet/lib/puppet/transaction/report.rb:108:in
>> `as_logging_destination'
>> C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:163:in `apply'
>> C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:125:in `block in
>> apply_catalog'
>> C:/Tools/Puppet/puppet/lib/puppet/util.rb:161:in `block in benchmark'
>> C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
>> C:/Tools/Puppet/puppet/lib/puppet/util.rb:160:in `benchmark'
>> C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:124:in `apply_catalog'
>> C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:192:in `run'
>> C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (4 levels) in run'
>> C:/Tools/Puppet/puppet/lib/puppet/agent/locker.rb:20:in `lock'
>> C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (3 levels) in run'
>> C:/Tools/Puppet/puppet/lib/puppet/agent.rb:114:in `with_client'
>> C:/Tools/Puppet/puppet/lib/puppet/agent.rb:41:in `block (2 levels) in run'
>> C:/Tools/Puppet/puppet/lib/puppet/agent.rb:79:in `run_in_fork'
>> C:/Tools/Puppet/puppet/lib/puppet/agent.rb:40:in `block in run'
>> C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `call'
>> C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `controlled_run'
>> C:/Tools/Puppet/puppet/lib/puppet/agent.rb:38:in `run'
>> C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:355:in `onetime'
>> C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:321:in
>> `run_command'
>> C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block (2 levels)
>> in run'
>> C:/Tools/Puppet/puppet/lib/puppet/application.rb:470:in `plugin_hook'
>> C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block in run'
>> C:/Tools/Puppet/puppet/lib/puppet/util.rb:478:in `exit_on_fail'
>> C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `run'
>> C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:137:in `run'
>> C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:91:in `execute'
>> C:/Tools/Puppet/puppet/bin/puppet:4:in `<main>'
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/ed1ffcb8-f3da-4079-ae8b-d115a08f9d5a%40googlegroups.com
>> <https://groups.google.com/d/msgid/puppet-users/ed1ffcb8-f3da-4079-ae8b-d115a08f9d5a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Rob Reynolds
> Developer, Puppet Labs
>
> *Join us at PuppetConf 2014 <http://www.puppetconf.com/>, September
> 20-24 in San Francisco*
> *Register by July 31st to take advantage of the Early Bird discount
> <https://puppetconf2014.eventbrite.com/?discount=EarlyBird> **—**save
> $249!*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAMJiBK7kuz1buVYVM530b074gzmnB32W3wMRdTCxgCPstoSQiw%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAMJiBK7kuz1buVYVM530b074gzmnB32W3wMRdTCxgCPstoSQiw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAF8-M2b7xLi9y14cZzVSDsW676-gagGrL_ZE5idOBGaejN%3DE3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to