Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am receiving the following error when trying to use the latest puppetlabs-apache module from github (

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter identifier at /etc/puppet/environments/development/modules/apache/manifests/mod.pp:40 on node Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping runn

My node config looks like:

node '' inherits 'base' {
  include apache
  include mysql::server
  include yumrepos::epel

  package { 'cacti':
    ensure => 'latest',

mod.pp contents:

define apache::mod (
  $package = undef
) {
  $mod = $name
  include apache::params
  #include apache #This creates duplicate resources in rspec-puppet
  $mod_packages = $apache::params::mod_packages
  $mod_package = $mod_packages[$mod] # 2.6 compatibility hack
  if $package {
    $package_REAL = $package
  } elsif "$mod_package" {
    $package_REAL = $mod_package
  $mod_libs = $apache::params::mod_libs
  $mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
  if "${mod_lib}" {
    $lib = $mod_lib

  $mod_identifiers = $apache::params::mod_identifiers
  $mod_identifier = $mod_identifiers[$mod]
  if "${mod_identifier}" {
    $identifier = $mod_identifier

  if $package_REAL {
    package { $package_REAL:
      ensure   => present,
      require  => Package['httpd'],
      before   => A2mod[$mod],

  a2mod { $mod:
    ensure     => present,
    lib        => $lib,
    identifier => $identifier,
    require    => Package['httpd'],
    notify     => Service['httpd'],

I have verified that the /var/lib/puppet/lib/puppet/type/a2mod.rb type has the identifier parameter and it is the same MD5 as the server:

Puppet::Type.newtype(:a2mod) do
    @doc = "Manage Apache 2 modules"


newparam :name do
   desc "The name of the module to be managed"



newparam :lib do
  desc "The name of the .so library to be loaded"

  defaultto { "mod_#{@resource[:name]}.so" }

newparam :identifier do
  desc "Module identifier string used by LoadModule. Default: module-name_module"


  defaultto { "#{@resource[:name]}_module" }

autorequire(:package) { catalog.resource(:package, 'httpd')}


I am using Puppet 3.0.2 on both agent and master. Any idea what may cause this?

share|improve this question
I'd also paste the relevant part of your node config so we can see how you're calling the apache module. – kashani Nov 14 '12 at 19:35
Good idea. Added those relevant sections. – Andy Shinn Nov 14 '12 at 22:01
Also, paste the contents of this file /etc/puppet/environments/apache_update/modules/apache/manifests/mod.pp – robbyt Nov 24 '12 at 18:44
Thanks, I have simplified my test and updated with the relevant mod.pp and a2mod.rb – Andy Shinn Feb 1 '13 at 1:48
What OSes are you using? – slm Feb 3 '13 at 2:49
up vote 1 down vote accepted

I think I finally tracked down a couple Puppet bugs which appear to be the cause of this. It is related to my use of multiple environments for testing and updating (which I didn't mention in the original problem since I didn't think it was relevant).

The first bug which showed up in a Google search after removing 'identifier' from my search term:

Then, this bug links to another which sounds like it is directly related:

I am also following and it could be related. I am following these bugs. I can confirm that after I actually merged my code to the main environment, it did start working (since the Puppet master now saw the code changes).

share|improve this answer

Seems that the problem is in your identifier declaration, you can try adding an else fail to see if that's the issue:

if "${mod_identifier}" {
  $identifier = $mod_identifier
else {
  fail('No identifier found'),
share|improve this answer
I've verified that once I move my commits to my master branch (to get the code in the primary environment path on the aster) it starts working fine. It looks to be directly related to to the bug. – Andy Shinn Feb 10 '13 at 1:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.