Re: [Puppet Users] undefined method `[]' for nil:NilClass
To diagnose this you'll want to get a full stack trace. Since the error is on the master you run the master with --trace and then find the stack trace in the log. On Tue, Jun 18, 2013 at 11:08 AM, Greg Chavez greg.cha...@gmail.com wrote: I upgrade our infrastructure (mostly RHEL5, some RHEL6) from 3.1 to puppet-3.2.1-1.el5. Ruby sits at ruby-1.8.7.370-1.el5. I ran some tests and everything seemed good so I pushed it out. Since then, all my puppet clients are failing with this: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `[]' for nil:NilClass at /etc/puppet/modules/site/manifests/init.pp:7 on node maps-cs-vm-03u.streamsage.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Googling shows that this is a common error that crops up for any number of reasons. I wonder what my reason is in this case. I use Cobbler as my ENC, so I have no node statements. Since I'm not using hiera yet, my site/init.pp looks like this: class site { if $::operatingsystem == RedHat { include puppet include ypbind include sudo if $::ipaddress =~ /^192\.168\./ { Class[puppet] - Class[ypbind] - Class[sudo] } else { include snmp Class[puppet] - Class[snmp] - Class[ypbind] - Class[sudo] } if $::hostname =~ /[dqcpu]$/ { include yum include java } # Fixes for mayhem caused by Dell Puppet repos package {dell-omsa-repository: ensure = absent } file {/etc/yum.repos.d/dell-omsa-repository.repo: ensure = absent } file {/etc/yum.repos.d/puppet-delete-me.repo: ensure = absent} notify {ENV == ${environment}:} package { koan: ensure = latest, } # artifact of setting the OOB IP in Cobbler file { /etc/sysconfig/network-scripts/ifcfg-oob: ensure = absent; } } elsif $::operatingsystem == Ubuntu { notify {Howdies! I am running Ubuntu!: } include ntp include puppet Class['ntp'] - Class['puppet'] } } Line 7 is include sudo. This is a modified version of saz-sudo-2.0.2. Any ideas? Thanks. -- \*..+.- --Greg Chavez +//..;}; -- 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 puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- 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 puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] undefined method `[]' for nil:NilClass
I am getting this error on all my hosts, I can't tell that it's causing a problem, everything seems to be working fine. Fri May 06 12:52:16 -0700 2011 /Stage[main]// Resources[ssh_authorized_key] (err): Failed to generate additional resources using 'generate': undefined method `[]' for nil:NilClass We are using user and group purging for all uids/gids above 0. I also have purging enabled for ssh public keys but have not tested whether it works. This is (probably) the relevant code -- sshkeys.pp (truncated class) class user::sshkeys { @ssh_authorized_key { 'jamie@localhost': ensure = 'present', user = 'jamie', type = 'dsa', key= 'snip', } } -- init.pp (truncated class) class user::sysadmin inherits user::defs_people { realize( Group['tech'], User['jamie'], Group['jamie'], Ssh_authorized_key['jamie@localhost'], ) } -- people.pp (truncated class) class user::defs_people { include user::sshkeys @user { 'jamie': ensure = 'present', uid= '785', gid= '785', managehome = 'true', home = '/home/jamie', shell = '/bin/bash', comment= 'Jamie is cool', password = 'snip', } @group { 'jamie': ensure = 'present', gid= '785', } } -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] undefined method `[]' for nil:NilClass
On Fri, May 6, 2011 at 13:05, Jamie gojamieg...@gmail.com wrote: I am getting this error on all my hosts, I can't tell that it's causing a problem, everything seems to be working fine. Fri May 06 12:52:16 -0700 2011 /Stage[main]// Resources[ssh_authorized_key] (err): Failed to generate additional resources using 'generate': undefined method `[]' for nil:NilClass Hrm. That is an internal bug in puppet: we are treating a nil value as an array, which is really not optimal. If you post a bug report including the output of a puppet run reproducing that with the '--debug' and '--trace' options that would be swell. Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman dan...@puppetlabs.com ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775 ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.