Environments are missing from the drop-down list in the node classifier. How do I fix it?
Links in this article take you to the documentation for Puppet Enterprise (PE) 2019.5. Use the version selector to choose the right version of our documentation for your deployment.
This article assumes that you are not using Code Manager. If you're using Code Manager, read more about managing environments with a Puppetfile.
Before you send classifier data to us, review it to make sure that it doesn't contain sensitive information such as hostnames, IP addresses, and environment names.
Version and installation information
PE version: 2016.1 to 2019.5
Verify that the environment directories on the master match the environments in the console
Environments in the console are populated from environment directories on the master. Verify that the environment directories on the master match the environments in the console:
List your environment directories. On the master, run:
ls -al /etc/puppetlabs/code/environments
Get the output of an environments endpoint request. On the master, run:
curl --cert $(puppet config print hostcert) --key $(puppet config print hostprivkey) --cacert $(puppet config print localcacert) https://$(hostname -f):8140/puppet/v3/environments
Check the names of the environments from both of these outputs against those listed in the console to confirm that they match.
Verify there are no issues with your environment code
When the Puppet parser is unable to compile code for an environment, the node classifier cannot sync the environment. Environments that are not synced do not appear in the console drop-down list. Verify there are no issues with your environment code:
/var/log/puppetlabs/console-services/console-services.logand search for environment related error messages.
/var/log/puppetlabs/puppetserver/puppetserver.logand search for environment related error messages.
Correct the code in the affected environments.
Refresh the cached class data using the node classifier API
If environments are still missing, refresh the cached class data using the node classifier API update-classes endpoint.
Run the following on the master:
curl -X POST https://$(puppet config print server):4433/classifier-api/v1/update-classes \ --cert $(puppet config print hostcert) \ --key $(puppet config print hostprivkey) \ --cacert $(puppet config print localcacert)
If you're unable to refresh the cached class data using the update-classes endpoint, or if your environments are still not appearing in the console drop-down list, please open a Support ticket.