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, 2019 in Puppet by Zenith
1,371 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, 2019 by Sirajul
• 59,230 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 15, 2019 in Puppet by Ranjan
752 views
0 votes
1 answer

Error saying "Error: Could not parse for environment production" - Puppet

Hey @Nagya, You need to set the ...READ MORE

answered Feb 15, 2019 in Puppet by Kavya
2,663 views
0 votes
1 answer

Error saying "Error: Could not autoload puppet/provider/package/rpm: No child processes." While installing gcc through puppet

Hey @Laksha, check your internet connectivity. You usually ...READ MORE

answered Feb 15, 2019 in Puppet by Jugnu
1,210 views
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, 2019 in Puppet by Krishti
737 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,063 views
+2 votes
1 answer
0 votes
1 answer

Puppet: Error: Could not parse for environment production: Syntax error at '='; expected '}'

This error occurs if puppet apply -e is used ...READ MORE

answered Aug 1, 2019 in Puppet by Sirajul
• 59,230 points
5,155 views
0 votes
1 answer

Puppet: Error while trying to execute shell commands in Exec resource type

The default exec provider on *nix OSes ...READ MORE

answered Aug 2, 2019 in Puppet by Sirajul
• 59,230 points
3,175 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP