On Tuesday, August 6, 2013 5:29:32 PM UTC-5, Dan M wrote: > > In a simplified form, the issue occurs when "include" statement appears in > the script. > For instance, below script executes just fine without <include apache>. > It still runs on the Master node (with warnings) with <include apache> but > fails on Agent node: > > /biz/puppet/hieradata/devbranch/site.pp: > node default { > > include apache > > file { "/etc/sudoers": > owner => root, group => root, mode => 660 > } > } > > Above site.pp executes on Master node: > [me@ip-10-0-8-10 ~]$ sudo puppet apply --verbose > /biz/puppet/hieradata/devbranch/site.pp > Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb > Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb > Info: Loading facts in > /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb > Info: Loading facts in > /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb > Info: Loading facts in > /etc/puppet/modules/concat/lib/facter/concat_basedir.rb > Warning: Could not retrieve fact fqdn > Warning: Host is missing hostname and/or domain: ip-10-0-8-10 > Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults > Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb > Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb > Info: Loading facts in > /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb > Info: Loading facts in > /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb > Info: Loading facts in > /etc/puppet/modules/concat/lib/facter/concat_basedir.rb > Info: Applying configuration version '1375827325' > Error: Could not start Service[httpd]: Execution of '/sbin/service httpd > start' returned 1: > Error: /Stage[main]/Apache/Service[httpd]/ensure: change from stopped to > running failed: Could not start Service[httpd]: Execution of '/sbin/service > httpd start' returned 1: > Notice: Finished catalog run in 4.04 seconds > > But fails for the Agent node: > [me@ip-10-0-8-11 puppet-skeleton]$ sudo puppet agent --test > Info: Retrieving plugin > Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb > Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb > Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb > Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb > Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > syntax error on line 13, col 10: `' at > /biz/puppet/hieradata/devbranch/site.pp:3 on node ip-10-0-8-11 > Warning: Not using cache on failed catalog > Error: Could not retrieve catalog; skipping run > > Any ideas? >
That compilation fails when your node declares class "apache" but not when it doesn't seems to pin the blame on that class. You should run the master with debug logging enabled, and check whether its log has anything more illuminating to say. Also, you should check whether there is more than one 'apache' module in your modulepath. Inasmuch as the modulepath does not vary with environment I don't think that should be an issue, but all the same, I would like to rule it out. Additionally, verify that every directory in your module path, everything in each one, and every directory in the paths to them are readable by the puppet user, and that all the directories are traversable by that user. The master process does not normally run with elevated privilege, so you do have to pay attention to file and directory permissions. Even if the initial setup were correct, you might conceivably cause yourself trouble later by performing module installs with privilege, as you in fact did. John -- 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.