Could not find default node or by name with 'vm7012.muc.baag, if not defined in manifests/node.pp

334 views
Skip to first unread message

Andreas Dvorak

unread,
Mar 31, 2016, 9:23:11 AM3/31/16
to Puppet Users
Dear all

if I do not list a server in the directory manifests e.g. in nodes.pp the agent says:
puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find default node or by name with 'vm7012.muc.baag, vm7012.muc, vm7012' on node vm7012.muc.baag
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

I know that is should work, because I have got it on an other Puppet Master server.
How can to solve that? It should be ignored that the server is not listed.

cat site.pp
if versioncmp($::puppetversion, '3.6.0') >= 0 {
  Package {
    allow_virtual => true,
  }
}
hiera_include('classes')

cat hiera/common.yaml
classes:
  - profiles::base

Puppet 3.7.5

Regards
Andreas

Chad Huneycutt

unread,
Mar 31, 2016, 1:56:58 PM3/31/16
to puppet...@googlegroups.com
Per https://docs.puppetlabs.com/puppet/3.7/reference/lang_node_definitions.html

"If site.pp contains at least one node definition, it must have one
for every node"

if you want the default behavior to be to just pull in classes from
hiera, then I would recommend wrapping your hiera_include in the
default node definition:

node default {
hiera_include('classes')
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/84c946c7-1b6b-40ea-8a7c-853596f86f4a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Chad M. Huneycutt

Andreas Dvorak

unread,
Apr 1, 2016, 2:30:37 AM4/1/16
to Puppet Users
Hi Chad,

thank that is the solution.


Andreas
Reply all
Reply to author
Forward
0 new messages