undefined method `each' for nil:NilClass
|Affected Puppet version:||0.25.4||Branch:|
I’m running with 0.25.4, with the dbconnections configuration variable fix (#2568) cherry-picked in. I’ve been getting some logs on my puppetmaster as follows:
puppetmasterd: undefined method `each' for nil:NilClass at /etc/puppet/modules/runlevel/manifests/init.pp:67 on node xxx puppetmasterd: undefined method `each' for nil:NilClass on node xxxx puppetmasterd: undefined method `each' for nil:NilClass at /etc/puppet/modules/nagios/manifests/base.pp:80 on node xxx.riseup.net
I was getting these in a previous release, but they were fixed by #2863, however they have come back. I checked the code that was changed in #2863, and it still exists, so that wasn’t removed. I have been having difficulties recently with storedconfig connections to the database causing catalog compiles to either take thousands of seconds, or spit out an error like this:
Apr 12 18:14:05 puppetmaster puppetmasterd: could not obtain a database connection within 5 seconds. The max pool size is currently 5; consider increasing it.
I added the dbconnections bit so I could increase that value, but quickly went from setting it to 10, to now 40 and I am still getting the error (although the max pool size is reported as 40 now, instead of 5 of course). I dont know if the nil:NilClass errors are caused when that happens, or if they are different issues.
#2 Updated by Klavs Klavsen over 3 years ago
I just saw one occurence of this on our 0.25.5 setup: puppetmasterd: undefined method `each' for nil:NilClass..
I have other error messages (see my case about this) which may bad handling of “performance issues” on the case of webrick. I’m working on settting up a passenger/mod_rails setup instead and see what errors continue after this. The above may or may not be related.