Ask Your Question

class is already declared error cannot redeclaire how to fix?

asked 2015-12-17 09:35:37 -0500

brikeyes gravatar image

I am getting this when I run my modules with Satellite and puppet . I have the puppet agent installed and alot of stuff is working right, but I have this nagging problem I am not sure how to fix.

rror: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Class[Jboss::Internal::Runtime::Dc] is already declared; cannot redeclare at /etc/puppet/environments/KTsatprodLibrarySOEPCI_5/modules/jboss/manifests/domain/controller.pp:14 on node Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

I am thinking that I need to know where

Class[Jboss::Internal::Runtime::Dc] is already declared

would this be in the same file or what is the scope of where it is declared ?

I am more that a little lost on this

also something very strange IN THE ERROR: Duplicate declaration: Class[Jboss::Internal::Runtime::Dc]

NOTE THE CAPITAL "D" but in the file that is referenced in the error the d is NOT capitalized , why ?

vi controller.pp

== Class: jboss::domain::controller


This class will setup parameters for JBoss server to run as controller of the domain. It

has no parameters. This class must be used before main JBoss class fo ex.:


include jboss::domain::controller

class { 'jboss':

enableconsole => true,


# class jboss::domain::controller { class { 'jboss::internal::runtime::dc': runsascontroller => true,

thanks for any help you can give on this , dont assume anything , I am a very experienced IT guy but have little knowledge on this stuff


edit retag flag offensive close merge delete


The class jboss::internal::runtime::dc looks to be a private class which you do not call directly. See if this is helpful;

Aaron Copley gravatar imageAaron Copley ( 2015-12-17 18:52:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-17 17:20:21 -0500

lupin gravatar image


The error meant exactly that, the 'jbosss::internal::runtime::dc' was already declared somewhere for that particular host/system and Puppet will not allow what. An example, on systemA if a classes are declared/applied to it like;

class { 'A': foo => bar, }

and on another class or module there's

class { 'A': foo => bar, } you will get an error like the one you have, now with Sat6 you need to trace which module/class that particular class was been declared. As for upper-case that's the convention/syntax that Puppet use when you reference a particular class or resource, e.g on relationship parameter before => Package['foo':] but actual package definition it's package {'foo': }

edit flag offensive delete link more


thanks , I am very new to all this so give me a few to look thru your responces and come up with a plan to fix this issues I appreciate the help , both of you

brikeyes gravatar imagebrikeyes ( 2015-12-17 19:57:15 -0500 )edit

so what i think needs to be done is first find out what other packages have 'jbosss::internal::runtime::dc' then figure out what to do about it , like I am assuming rename it if possible?

brikeyes gravatar imagebrikeyes ( 2015-12-17 20:02:19 -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


Asked: 2015-12-17 09:35:37 -0500

Seen: 1,304 times

Last updated: Dec 17 '15