The syntax appears to be correct, from what I see. Being that this Apache 
module came from PuppetLabs, I think it is safe to assume that the module is 
robust. I would try to try enable full debugging on both the agent and the 
master. 

Also, on the agent, try to walk through the installation of Apache on the node. 
Sometimes what appears to be Puppet error is actually caused by the 
application. For example, I had an issue with nginx not starting up because of 
an error in the service code here:


class nginx::service (
  $svc = $nginx::params::svc,
) {
  
  service { $svc:
    enable => true,
    ensure => "running",
    hasrestart => true,
    hasstatus => true,
    require => Class['nginx::install'],
  }
  
}


After verifying and modifying the code, I went and tried to start up nginx 
manually. Turns out that default configuration was missing a semi-colon on one 
of the lines. That caused nginx not to start - an error that wasn't exposed 
easily in the system log (where puppet usually logs by default). Fixing that 
misconfiguration resolved the nginx start problem. :)

- Rilindo

On Aug 6, 2013, at 5:29 PM, Dan M <mushkev...@gmail.com> 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?
> 
> -- 
> 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.


Reply via email to