Hi Campee,

On Thursday, May 9, 2013 3:34:20 AM UTC+1, Campee wrote:

>
> I run puppet and get this error:
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find data item ak_auth_primary in any Hiera data file and no 
> default supplied at /etc/puppet/manifests/site.pp:11 on node 
> tag5-4-qa-sjc.domain.net
>
> on my puppet master server:
>
> $ hiera ak_auth_primary region=northamerica datacenter=sjc environment=qa
>
> Answer: ops1-1-qa-sjc
>
> $ hiera ak_auth_primary region=northamerica datacenter=sjc environment=qa 
> machinetype=tag hostname=tag5-4-qa-sjc
>
>
Can you test Hiera like this (on your Puppet Master), it uses the Facts 
cache of your node, rather than you filling in all the gaps by hand, and 
thus is a more thorough test:

hiera -c /etc/puppet/hiera.yaml -y /var/lib/puppet/yaml/facts/
tag5-4-qa-sjc.domain.net.yaml  ak_auth_primary  --debug

You should get some helpful debug trace through what Hiera is doing and 
what data files it is trying to open, in order:

DEBUG: Thu May 24 13:18:53 +0000 2012: Hiera JSON backend starting
DEBUG: Thu May 24 13:18:53 +0000 2012: Looking up key 'ak_auth_primary' in 
JSON backend
DEBUG: Thu May 24 13:18:53 +0000 2012: Backend datadir for json is an 
Array, multiple data dirs to search
DEBUG: Thu May 24 13:18:53 +0000 2012: Looking in data dir 
/etc/puppet/private/
DEBUG: Thu May 24 13:18:53 +0000 2012: Looking at hierarchy source 
tag5-4-qa-sjc.domain.net
DEBUG: Thu May 24 13:18:53 +0000 2012: Cannot find datafile 
/etc/puppet/private/tag5-4-qa-sjc.domain.net.json, skipping
DEBUG: Thu May 24 13:18:53 +0000 2012: Looking at hierarchy source common
DEBUG: Thu May 24 13:18:53 +0000 2012: Cannot find datafile 
/etc/puppet/private/common.json, skipping
DEBUG: Thu May 24 13:18:53 +0000 2012: Looking at hierarchy source 
tag5-4-qa-sjc.domain.net

-Luke

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to