Issue #14979 has been updated by Graham Bleach.

We get these errors too, running 2.7.18 and we also previously saw them on 
2.7.9. 

They seem to happen when we deploy changed puppet code; I've seen them 
regularly fail in the output of our deployment and also have looked at all 
instances in the logs and none occurred outside typical working hours.

Our deployment does this:

- Update the environments. These are clones of our git repos following master, 
staging and production branches.
- Touch manifests/site.pp
- Run puppetd --test on the master node, this is typically the one for which 
the catalog fails. Here's an example:

Dec  5 16:41:41 of1-core puppet-master[15214]:
/usr/lib/ruby/1.8/puppet/parser/compiler.rb:27:in `compile'
/usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:77:in `compile'
/usr/lib/ruby/1.8/puppet/util.rb:160:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/lib/ruby/1.8/puppet/util.rb:159:in `benchmark'
/usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:75:in `compile'
/usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:35:in `find'
/usr/lib/ruby/1.8/puppet/indirector/indirection.rb:196:in `find'
/usr/lib/ruby/1.8/puppet/network/http/handler.rb:109:in `do_find'
/usr/lib/ruby/1.8/puppet/network/http/handler.rb:68:in `send'
/usr/lib/ruby/1.8/puppet/network/http/handler.rb:68:in `process'
/usr/lib/ruby/1.8/puppet/network/http/webrick/rest.rb:24:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:45:in `listen'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `call'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:42:in `listen'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:41:in `initialize'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:41:in `new'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:41:in `listen'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:38:in `synchronize'
/usr/lib/ruby/1.8/puppet/network/http/webrick.rb:38:in `listen'
/usr/lib/ruby/1.8/puppet/network/server.rb:126:in `listen'
/usr/lib/ruby/1.8/puppet/network/server.rb:141:in `start'
/usr/lib/ruby/1.8/puppet/daemon.rb:124:in `start'
/usr/lib/ruby/1.8/puppet/application/master.rb:200:in `main'
/usr/lib/ruby/1.8/puppet/application/master.rb:144:in `run_command'
/usr/lib/ruby/1.8/puppet/application.rb:309:in `run'
/usr/lib/ruby/1.8/puppet/application.rb:416:in `hook'
/usr/lib/ruby/1.8/puppet/application.rb:309:in `run'
/usr/lib/ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
/usr/lib/ruby/1.8/puppet/application.rb:309:in `run'
/usr/lib/ruby/1.8/puppet/util/command_line.rb:69:in `execute'
/usr/bin/puppet:4

- I can't reproduce just by touching site.pp in the appropriate environment dir 
and then running puppet agent --test again
- It's often a different template that fails each time. 
- Running puppet agent --test straight after a failure, without changing any 
puppet code, pretty much always runs to completion successfully.


----------------------------------------
Bug #14979: inconsistent server 400 error: undefined method `parent' for 
nil:NilClass
https://projects.puppetlabs.com/issues/14979#change-78229

Author: Banio Carpenter
Status: Investigating
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


I see this server 400 error intermittently when run as a cron. I'm not able to 
reproduce it running puppet manually. I have tried many times to reproduce it 
using:

    puppetd -t
    puppet agent -t
    puppet agent --no-daemonize --onetime --verbose
    puppetd --no-daemonize --onetime --verbose

The error is:

    Could not retrieve catalog from remote server: Error 400 on SERVER: Failed 
to parse template admissions/zz_admissions_vhost.conf.erb: undefined method 
`parent' for nil:NilClass at 
/etc/puppet/modules/admissions/manifests/apache.pp:84 on node nodee.mydomain.com

the relevant part of apache.pp (content is line 84):

    file { "/etc/httpd/conf.d/zz_admissions_vhost.conf":
    ensure => present,
    owner => root,
    group => root,
    mode => 640,
    content => template('admissions/zz_admissions_vhost.conf.erb'),
    } ->


the only fact/variable I have in the template 
(admissions/zz_admissions_vhost.conf.erb) is this:

    ServerName <%= domain %>

Versions:

    # puppetd --version
    2.7.14
    # ruby --version
    ruby 1.8.5 (2006-08-25) [i386-linux]
    # facter --version
    1.6.9

Again I can't reproduce this manually, only happens when run as a cron, and 
even then only sometimes--percentage ranges from 10% to 75% depending on the 
day.  The cron is:

    puppet agent --no-daemonize --onetime --verbose



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to