FAQ
puppet 3.3.2 on RHEL6

If I run puppet on a node:
# sudo puppet agent --test --noop

I get the following error:



*Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Duplicate declaration: Package[bind] is already declared in file
/etc/puppet/modules/site/manifests/dns_test.pp:4; cannot redeclare at
/etc/puppet/modules/site/manifests/dns.pp:4 on node
bushlnxadm01.chicagobooth.eduWarning: Not using cache on failed
catalogError: Could not retrieve catalog; skipping run*


That's weird. That node isn't a DNS server and shouldn't even be thinking
about running bind.

If I open /etc/puppet/manifests/site.pp and save the file, the error goes
away on next puppet agent run.

After about 15 minutes the node starts trying to apply the classes from */etc/puppet/modules/site/manifests/dns_test.pp
*and after another 5 or so minutes I start getting the duplicate
declaration error again.

If I save the manifest the puppet agent command works as expected for
another 15 minutes or so.



I can't even begin to think of where to start looking on this. Any thoughts
would be appreciated.
This seems to be happening on every node.


-n

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/74814870-7ff7-49f1-b764-a155afd31168%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jeff Bachtel at Dec 18, 2013 at 1:25 am
    Do you have use_cached_catalog set on puppet agents or puppetmaster? Are
    you using storeconfigs / puppetdb?

    Offhand, I'd guess that when you modify mtime of site.pp by saving, that
    forces puppet to invalidate the cached catalog and temporarily resolve
    the problem.

    If necessary, are you able to update to the latest 3.4rc (agent might
    suffice) for testing?

    Jeff
    On 12/17/2013 03:35 PM, Nathan Earixson wrote:
    puppet 3.3.2 on RHEL6

    If I run puppet on a node:
    # sudo puppet agent --test --noop

    I get the following error:

    /Error: Could not retrieve catalog from remote server: Error 400 on
    SERVER: Duplicate declaration: Package[bind] is already declared in
    file /etc/puppet/modules/site/manifests/dns_test.pp:4; cannot
    redeclare at /etc/puppet/modules/site/manifests/dns.pp:4 on node
    bushlnxadm01.chicagobooth.edu
    Warning: Not using cache on failed catalog
    Error: Could not retrieve catalog; skipping run/


    That's weird. That node isn't a DNS server and shouldn't even be
    thinking about running bind.

    If I open /etc/puppet/manifests/site.pp and save the file, the error
    goes away on next puppet agent run.

    After about 15 minutes the node starts trying to apply the classes
    from //etc/puppet/modules/site/manifests/dns_test.pp /and after
    another 5 or so minutes I start getting the duplicate declaration
    error again.

    If I save the manifest the puppet agent command works as expected for
    another 15 minutes or so.



    I can't even begin to think of where to start looking on this. Any
    thoughts would be appreciated.
    This seems to be happening on every node.


    -n

    --
    You received this message because you are subscribed to the Google
    Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/puppet-users/74814870-7ff7-49f1-b764-a155afd31168%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52B0F991.4020606%40bericotechnologies.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Nathan Earixson at Dec 20, 2013 at 12:04 am
    storeconfigs and use_cached_catalog are both false on the puppet master and
    on the puppet agents.

    I think you're right but I don't understand the 'drift' in the cached
    catalog.

    I updated to 3.4rc2 on an agent and the same behavior persists.
    On Tuesday, December 17, 2013 7:25:37 PM UTC-6, Jeff Bachtel wrote:

    Do you have use_cached_catalog set on puppet agents or puppetmaster? Are
    you using storeconfigs / puppetdb?

    Offhand, I'd guess that when you modify mtime of site.pp by saving, that
    forces puppet to invalidate the cached catalog and temporarily resolve the
    problem.

    If necessary, are you able to update to the latest 3.4rc (agent might
    suffice) for testing?

    Jeff

    On 12/17/2013 03:35 PM, Nathan Earixson wrote:

    puppet 3.3.2 on RHEL6

    If I run puppet on a node:
    # sudo puppet agent --test --noop

    I get the following error:



    *Error: Could not retrieve catalog from remote server: Error 400 on
    SERVER: Duplicate declaration: Package[bind] is already declared in file
    /etc/puppet/modules/site/manifests/dns_test.pp:4; cannot redeclare at
    /etc/puppet/modules/site/manifests/dns.pp:4 on node
    bushlnxadm01.chicagobooth.edu <http://bushlnxadm01.chicagobooth.edu>
    Warning: Not using cache on failed catalog Error: Could not retrieve
    catalog; skipping run*


    That's weird. That node isn't a DNS server and shouldn't even be thinking
    about running bind.

    If I open /etc/puppet/manifests/site.pp and save the file, the error goes
    away on next puppet agent run.

    After about 15 minutes the node starts trying to apply the classes from */etc/puppet/modules/site/manifests/dns_test.pp
    *and after another 5 or so minutes I start getting the duplicate
    declaration error again.

    If I save the manifest the puppet agent command works as expected for
    another 15 minutes or so.



    I can't even begin to think of where to start looking on this. Any
    thoughts would be appreciated.
    This seems to be happening on every node.


    -n

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to puppet-users...@googlegroups.com <javascript:>.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/puppet-users/74814870-7ff7-49f1-b764-a155afd31168%40googlegroups.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/aef2c73a-8995-4938-87b7-3e5363d2960b%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jcbollinger at Dec 18, 2013 at 2:53 pm

    On Tuesday, December 17, 2013 2:35:58 PM UTC-6, Nathan Earixson wrote:
    puppet 3.3.2 on RHEL6

    If I run puppet on a node:
    # sudo puppet agent --test --noop

    I get the following error:



    *Error: Could not retrieve catalog from remote server: Error 400 on
    SERVER: Duplicate declaration: Package[bind] is already declared in file
    /etc/puppet/modules/site/manifests/dns_test.pp:4; cannot redeclare at
    /etc/puppet/modules/site/manifests/dns.pp:4 on node
    bushlnxadm01.chicagobooth.edu
    <http://bushlnxadm01.chicagobooth.edu>Warning: Not using cache on failed
    catalogError: Could not retrieve catalog; skipping run*


    That's weird. That node isn't a DNS server and shouldn't even be thinking
    about running bind.

    If I open /etc/puppet/manifests/site.pp and save the file, the error goes
    away on next puppet agent run.

    After about 15 minutes the node starts trying to apply the classes from */etc/puppet/modules/site/manifests/dns_test.pp
    *and after another 5 or so minutes I start getting the duplicate
    declaration error again.

    If I save the manifest the puppet agent command works as expected for
    another 15 minutes or so.



    I can't even begin to think of where to start looking on this. Any
    thoughts would be appreciated.
    This seems to be happening on every node.
    Strange caching behavior sometimes results when you have declarations at
    top level in a manifest other than site.pp or one directly or indirectly
    'import'ed by site.pp. For instance,

    <module_path>/my_module/manifests/init.pp:
    ----
    class my_module {
       # doesn't matter
    }

    # Oops:
    include dns_test

    # Also oops:
    Class['dns'] -> Class['my_module']
    ----

    That sort of thing is very bad form because any declaration at top scope
    (i.e. outside any class, node, or type definition) applies, in principle,
    to all nodes, but manifests that are (only) autoloaded are may not actually
    be evaluated for every node. The manifest author's intention is often that
    the top-scope declaration apply only to nodes that declare the class or
    type associated with the manifest, but that's not the actual semantics.

    Behavior much like what you describe can result: everything works as
    intended when the master first starts, but after a node checks in that
    declares a certain class or type, nodes that subsequently check in get
    cached top-scope declarations that were not intended for them.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f5ad49c5-a8f0-49e9-852d-d38af59d2731%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Nathan Earixson at Dec 20, 2013 at 1:15 am
    aha. this was it. I had:
    package { "bind":
      ensure => "installed"
    }


    OUTSIDE of the "class site::dns_test {" declaration. Thank you very much
    for the help.

    -n

    On Wednesday, December 18, 2013 8:52:57 AM UTC-6, jcbollinger wrote:


    On Tuesday, December 17, 2013 2:35:58 PM UTC-6, Nathan Earixson wrote:

    puppet 3.3.2 on RHEL6

    If I run puppet on a node:
    # sudo puppet agent --test --noop

    I get the following error:



    *Error: Could not retrieve catalog from remote server: Error 400 on
    SERVER: Duplicate declaration: Package[bind] is already declared in file
    /etc/puppet/modules/site/manifests/dns_test.pp:4; cannot redeclare at
    /etc/puppet/modules/site/manifests/dns.pp:4 on node
    bushlnxadm01.chicagobooth.edu
    <http://bushlnxadm01.chicagobooth.edu>Warning: Not using cache on failed
    catalogError: Could not retrieve catalog; skipping run*


    That's weird. That node isn't a DNS server and shouldn't even be thinking
    about running bind.

    If I open /etc/puppet/manifests/site.pp and save the file, the error goes
    away on next puppet agent run.

    After about 15 minutes the node starts trying to apply the classes from */etc/puppet/modules/site/manifests/dns_test.pp
    *and after another 5 or so minutes I start getting the duplicate
    declaration error again.

    If I save the manifest the puppet agent command works as expected for
    another 15 minutes or so.



    I can't even begin to think of where to start looking on this. Any
    thoughts would be appreciated.
    This seems to be happening on every node.
    Strange caching behavior sometimes results when you have declarations at
    top level in a manifest other than site.pp or one directly or indirectly
    'import'ed by site.pp. For instance,

    <module_path>/my_module/manifests/init.pp:
    ----
    class my_module {
    # doesn't matter
    }

    # Oops:
    include dns_test

    # Also oops:
    Class['dns'] -> Class['my_module']
    ----

    That sort of thing is very bad form because any declaration at top scope
    (i.e. outside any class, node, or type definition) applies, in principle,
    to all nodes, but manifests that are (only) autoloaded are may not actually
    be evaluated for every node. The manifest author's intention is often that
    the top-scope declaration apply only to nodes that declare the class or
    type associated with the manifest, but that's not the actual semantics.

    Behavior much like what you describe can result: everything works as
    intended when the master first starts, but after a node checks in that
    declares a certain class or type, nodes that subsequently check in get
    cached top-scope declarations that were not intended for them.


    John
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c7906b74-3be2-443a-b11a-ac379b94f484%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedDec 18, '13 at 12:22a
activeDec 20, '13 at 1:15a
posts5
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase