Ask Your Question

Error 400 could not find class

asked 2015-12-26 21:18:29 -0500

aaaaarrrgghhh gravatar image

A beginner environment with Puppet(3.8.4)+Apache(2.2.15)+Passenger on CentOS6.5 An agent run returns with (i'm ignoring the first Error about plugins)

    Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://puppetmaster/plugins 
   Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class mediawiki at /etc/puppet/environments/production/manifests/nodes.pp:10 on node wikitest

This is sequence of installing the module:

$>sudo puppet module generate my-mediawiki --environment production
$>sudo mv my-mediawiki mediawiki (just renaming the folder)
$>sudo puppet module list
/etc/puppet/modules (no modules installed)
/usr/share/puppet/modules (no modules installed)

I have tried adding $confdir/environments/production/modules to environment.conf of the production environment and to the basemodulepath in puppet.conf as the first entry, but it doesn't seem to be looking there. $confdir/environments/production/modules/mediawiki/manifests/init.pp has the empty class declaration. $confdir/environments/production/nodes.pp has the class statements in both nodes and both have the same error.

I've already tried:

  1. Removing the module and trying again, with all the puppet service stopped/started etc
  2. There are no spelling or quotation mark errors I've modified metadata.json in the mediawiki folder to be same as folder name just in case that mattered, but no luck.

  3. Certificates are fine, communication is fine. I have another class defined as resource within the nodes.pp file and that runs fine

Any help appreciated!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-29 03:48:38 -0500

I'm a bit confused by what you're trying to do there. Are you trying to create a new module (puppet module generate) or are you trying to install a module (puppet module install)?

In either case the error message is telling you that puppet can't find the class mediawiki.

On your puppet master you can view your module path:

puppet master --configprint modulepath

You should then have a file in one of those paths:


And in init.pp should be the definition for your class mediawiki.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-12-26 21:18:29 -0500

Seen: 1,451 times

Last updated: Dec 29 '15