Ask Your Question
0

Error 500 on SERVER: Server Error: Could not find class custom::class for <agent.tld> on <agent.tld>

asked 2018-05-03 10:37:58 -0500

updated 2018-05-04 00:09:35 -0500

Mr_Sharma gravatar image

I've searched for days for this and can't seem to find a solution.

I've created a module that will manage various support scripts through Red Hat Satellite. I've created a class called manage_scripts. Inside that class I've created several subclasses to manage each individual script. I have this puppet module working -- somewhat. I have subclasses for 4 scripts - two work, two don't and it's completely baffling me. These puppet classes work!! I can run them locally and the files are moved and correct permissions assigned.

Output of 'sudo puppet agent -t'

<code>
Info: Using configured environment 'correct environment'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not find class manage_scripts::passwdChangeDates for [agent.tld] on node [agent.tld]
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
</code>

Output of puppet module that throws the error

<code>cat passwdChangeDates.pp</code>
<code>
class manage_scripts::passwdChangeDates {
        file {'/usr/local/sbin/passwdChangeDates':
                ensure => file,
                content => template("manager_scripts/passwdChangeDates.sh"),
                owner => root,
                group => wheel,
                mode => '0555',
        }
}</code>

Output of puppet class that works:

<code> cat disk_usage.pp</code>
<code>
class manage_scripts::disk_usage {
        file {'/usr/local/sbin/disk_usage':
                ensure => file,
                content => template("manage_scripts/disk_usage.sh"),
                owner => root,
                group => wheel,
                mode => '0555',
        }
}</code>

What am I missing? Am I way off base with how I'm creating these?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-05-04 01:00:53 -0500

Mr_Sharma gravatar image

It seem there's a problem with the name of manifest what you have. As per the module naming conventions it is not suppose to take upper case letters. Can you change the class name to passwdchangedates and test it out?

reference link: https://puppet.com/docs/puppet/5.3/mo...

Hope this will sort out your problem.

edit flag offensive delete link more

Comments

That's it. Can't believe it was something so trivial. Thank you.

space_force_commander gravatar imagespace_force_commander ( 2018-05-06 23:58:16 -0500 )edit

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: 2018-05-03 10:37:58 -0500

Seen: 238 times

Last updated: May 04