Could not find data item in any Hiera data file

14 views
Skip to first unread message

Sudhir R

unread,
Feb 4, 2020, 6:32:58 PM2/4/20
to Puppet Users


Hi Team, I am experiencing issue when executing below command on the puppet server, can you please assist me in debug the issue..1.) I execute this command on the puppet master server => puppet master --debug --compile sc-prd-scm-perforce001.eng.are.comError: Could not find data item scm_liagent.ini.erb in any Hiera data file and no default supplied at /etc/puppet/environments/production/modules/li_agent/manifests/config.pp:13 on node sc-prd-scm-perforce001.eng.are.com
Error: Could not find data item scm_liagent.ini.erb in any Hiera data file and no default supplied at /etc/puppet/environments/production/modules/li_agent/manifests/config.pp:13 on node sc-prd-scm-perforce001.eng.are.com
Error: Failed to compile catalog for node sc-prd-scm-perforce001.eng.are.com: Could not find data item scm_liagent.ini.erb in any Hiera data file and no default supplied at /etc/puppet/environments/production/modules/li_agent/manifests/config.pp:13 on node sc-prd-scm-perforce001.eng.are.com


2.) The file does exist under the hiera directory on the puppet server
[root@sc-prd-scm-puppet002 hiera]# ls -ltr /etc/puppet/environments/production/hiera/scm_liagent.ini.erb
-rw-r--r-- 1 puppet puppet 2018 Feb 3 18:50 /etc/puppet/environments/production/hiera/scm_liagent.ini.erb (edited)


3.) Hiera configuration as follows....[root@sc-prd-scm-puppet002 environments]# cat /etc/puppet/hiera.yaml
#################################################################
## File maintained by Puppet, any changes will be overwritten. ##
#################################################################
######################## DO NOT EDIT ############################
---
:backends:
- json
- yaml
- file
:json:
:datadir: '/etc/puppet/environments/%{::host_environment}/hiera'
:yaml:
:datadir: '/etc/puppet/environments/%{::host_environment}/hiera'
:file:
:datadir: '/etc/puppet/environments/%{::host_environment}/hiera'
:interpolate: false # defaults to true
:hierarchy:
- "private/node/%{::fqdn}"
- "private/location/%{::host_location}/%{::host_type_function_inst_suffix}"
- "private/location/%{::host_location}/%{::host_type_function}"
- "private/location/%{::host_location}/%{::host_type}"
- "private/location/%{::host_location}/common"
- "private/%{::host_type_function_inst_suffix}"
- "private/%{::host_type_function}"
- "private/%{::host_type}"
- "private/os/%{::operatingsystem}/%{::operatingsystemmajrelease}/common"
- private/common
- "node/%{::fqdn}"
- "location/%{::host_location}/%{::host_type_function_inst_suffix}"
- "location/%{::host_location}/%{::host_type_function}"
- "location/%{::host_location}/%{::host_type}"
- "location/%{::host_location}/common"
- "%{::host_type_function_inst_suffix}"
- "%{::host_type_function}"
- "%{::host_type}"
- "os/%{::operatingsystem}/%{::operatingsystemmajrelease}/common"
- common:merge_behavior: deeper

4.) Puppet server version
[root@sc-prd-scm-puppet002 hiera]# puppet master --version
3.8.7

Henrik Lindberg

unread,
Feb 5, 2020, 5:39:50 AM2/5/20
to puppet...@googlegroups.com
You can try using the lookup CLI tool with --explain turned on to get
detailed information about exactly what hiera is reading and what
decisions it is making when producing a value (or not finding anything).

You can also get that level of detail in your logs by running the server
with --debug turned on.

Armed with that information you should be able to see where hiera is
doing something you did not expect.

Best,
- henrik

On 2020-02-04 20:33, Sudhir R wrote:
>
>
> *Hi Team, I am experiencing issue when executing below command on the
> puppet server, can you please assist me in debug the issue..**1.) I
> execute this command on the puppet master server*=> puppet master
> --debug --compile sc-prd-scm-perforce001.eng.are.com
> <http://sc-prd-scm-perforce001.eng.are.com/>Error: Could not find data
> item scm_liagent.ini.erb in any*Hiera data file and no default supplied
> at
> /etc/puppet/environments/production/modules/li_agent/manifests/config.pp:13
> on node **sc-prd-scm-perforce001.eng.are.com
> <http://sc-prd-scm-perforce001.eng.are.com/>*
> Error: Could not find data item scm_liagent.ini.erb in any Hiera data
> file and no default supplied at
> /etc/puppet/environments/production/modules/li_agent/manifests/config.pp:13
> on node sc-prd-scm-perforce001.eng.are.com
> <http://sc-prd-scm-perforce001.eng.are.com/>
> Error: Failed to compile catalog for node
> sc-prd-scm-perforce001.eng.are.com
> <http://sc-prd-scm-perforce001.eng.are.com/>: Could not find data item
> scm_liagent.ini.erb in any Hiera data file and no default supplied at
> /etc/puppet/environments/production/modules/li_agent/manifests/config.pp:13
> on node sc-prd-scm-perforce001.eng.are.com
> <http://sc-prd-scm-perforce001.eng.are.com/>
>
> *
> *
> *2.) The file does exist under the hiera directory on the puppet server*
> [root@sc-prd-scm-puppet002 hiera]# ls -ltr
> /etc/puppet/environments/production/hiera/scm_liagent.ini.erb
> -rw-r--r-- 1 puppet puppet 2018 Feb 3 18:50
> /etc/puppet/environments/production/hiera/scm_liagent.ini.erb (edited)
>
>
> *3.) Hiera configuration as follows....*[root@sc-prd-scm-puppet002
> environments]#*cat /etc/puppet/hiera.yaml*
> *4.) Puppet server version*
> [root@sc-prd-scm-puppet002 hiera]# puppet master --version
> 3.8.7
>
> --
> 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
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/0e4c2313-6018-43d9-be06-12e33bcc7305%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/0e4c2313-6018-43d9-be06-12e33bcc7305%40googlegroups.com?utm_medium=email&utm_source=footer>.


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Reply all
Reply to author
Forward
0 new messages