Error while configuring Hiera for puppet

0 votes

there's a issue when attempting to apply a module the contains a Hiera lookup to an agent.

When running from the Windows agent:

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find data item git_client in any Hiera data file and no default supplied at /etc/puppetlabs/puppet/environments/develop/modules/[REDACTED PATH TO .pp FILE]:24 on node [REDACTED]
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

hiera.yaml

:backends:
  - yaml
:hierarchy:
  - defaults
  - "%{clientcert}"
  - "%{environment}"
  - global

:yaml:
  :datadir: '/etc/puppetlabs/puppet/hiera'

develop.yaml

git_client:
    file_content:here

puppet.conf:

[main]
server=[REDACTED]
pluginsync=true
autoflush=true
archive_files=true
archive_file_server=[REDACTED]
graph=true
environment=develop

When running Hiera to debug:

/opt/puppet/bin/hiera git_client environment=develop -c /etc/puppetlabs/puppet/hiera.yaml --debug

DEBUG: 2015-05-12 12:40:27 -0400: Hiera YAML backend starting
DEBUG: 2015-05-12 12:40:27 -0400: Looking up git_client in YAML backend
DEBUG: 2015-05-12 12:40:27 -0400: Looking for data source defaults
DEBUG: 2015-05-12 12:40:27 -0400: Cannot find datafile /etc/puppetlabs/puppet/hiera/defaults.yaml, skipping
DEBUG: 2015-05-12 12:40:27 -0400: Looking for data source develop
DEBUG: 2015-05-12 12:40:27 -0400: Found git_client in develop
file_content:here

Aug 2 in Puppet by Zenith
7 views

1 answer to this question.

0 votes
  • In order for changes to your hiera configuration to take effect, you need to make sure to restart your puppet master

  • If you are using the puppetserver that runs in the JVM then restart the pe-puppetserver service

  • If you are using the old ruby master running on passenger, then restart pe-httpd.

    Hope this helps!

answered Aug 2 by Sirajul
• 19,670 points

Related Questions In Puppet

0 votes
1 answer

Error while using newrelic class - Puppet

Hey @Harjot, The catalog compiler will look ...READ MORE

answered Feb 14 in Puppet by Ranjan
22 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Are there any pre-requisites while installing Puppet for windows?

Puppet masters run only on Linux or ...READ MORE

answered Feb 21 in Puppet by Krishti
27 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
124 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer