Ask Your Question
0

Error 400: Could not find class

asked 2016-04-12 05:44:30 -0500

SPQRInc gravatar image

updated 2016-04-12 05:49:20 -0500

Hello,

I try to include the module docsf on my Foreman/Puppet-System. I cloned the git and moved the content to the modules-path /etc/puppet/environments/production/modules.

If I assign the module to a host, I'm getting this error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class docsf for example.com on node example.com .
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

This is the tree of files (/etc/puppet/environments/production/modules):

docsf/
├── lib
│   └── facter
│       └── configserver_firewall.rb
├── LICENSE
├── manifests
│   ├── init.pp
│   ├── params.pp
│   ├── postinit.pp
│   └── preinit.pp
├── metadata.json
├── README.md
├── spec
│   └── spec_helper.rb
├── templates
│   ├── conf.maldet.erb
│   ├── csf.allow.erb
│   ├── csf.conf.erb
│   ├── csf.fignore.erb
│   ├── csf.ignore.erb
│   └── csf.pignore.erb
└── tests
    └── init.pp

This is the file-tree with permissions:

[root@puppet modules]# tree -p -u -g docsf/
docsf/
├── [drwxr-xr-x puppet   root    ]  lib
│   └── [drwxr-xr-x puppet   root    ]  facter
│       └── [-rw-r--r-- puppet   root    ]  configserver_firewall.rb
├── [-rw-r--r-- puppet   root    ]  LICENSE
├── [drwxr-xr-x puppet   root    ]  manifests
│   ├── [-rw-r--r-- puppet   root    ]  init.pp
│   ├── [-rw-r--r-- puppet   root    ]  params.pp
│   ├── [-rw-r--r-- puppet   root    ]  postinit.pp
│   └── [-rw-r--r-- puppet   root    ]  preinit.pp
├── [-rw-r--r-- puppet   root    ]  metadata.json
├── [-rw-r--r-- puppet   root    ]  README.md
├── [drwxr-xr-x puppet   root    ]  spec
│   └── [-rw-r--r-- puppet   root    ]  spec_helper.rb
├── [drwxr-xr-x puppet   root    ]  templates
│   ├── [-rw-r--r-- puppet   root    ]  conf.maldet.erb
│   ├── [-rw-r--r-- puppet   root    ]  csf.allow.erb
│   ├── [-rw-r--r-- puppet   root    ]  csf.conf.erb
│   ├── [-rw-r--r-- puppet   root    ]  csf.fignore.erb
│   ├── [-rw-r--r-- puppet   root    ]  csf.ignore.erb
│   └── [-rw-r--r-- puppet   root    ]  csf.pignore.erb
└── [drwxr-xr-x puppet   root    ]  tests
    └── [-rw-r--r-- puppet   root    ]  init.pp
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-04-12 13:56:35 -0500

UBPClaw gravatar image

What is the result of the following command

puppet config print modulepath

Im thinking you have your module in the wrong path, it should be in one of these three paths (based on output Im getting from my system)

/etc/puppetlabs/puppet/environments/production/modules /etc/puppetlabs/puppet/modules /opt/puppetlabs/puppet/modules

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

Stats

Asked: 2016-04-12 05:44:30 -0500

Seen: 75 times

Last updated: Apr 12 '16