Learn how to fix environments that are missing in the console on the Node groups page from the Environments drop-down list.
This article assumes that you are not using Code Manager. If you’re using Code Manager, read more about managing environments with a Puppetfile.
Version and installation information
PE version: All supported
OS: Unix
Solution
Verify that the environment directories on the primary server match the environments in the console
Environments in the console are populated from environment directories on the primary server. Verify that environment directories on the primary server match the environments in the console by completing these steps:
-
List your environment directories. On the primary server, run:
ls -al /etc/puppetlabs/code/environments
-
Get the output of an environments endpoint request. On the primary server, 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 outputs against those listed in the console to confirm that they match. If they don’t match after completing the rest of the steps in this article, open a Support ticket to get additional help.
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 by completing these steps:
-
Open
/var/log/puppetlabs/console-services/console-services.log
and search for environment-related error messages. -
Open
/var/log/puppetlabs/puppetserver/puppetserver.log
and search for environment-related error messages. -
Correct any code issues that you find 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 primary server:
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.
Note: 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.
How can we improve this article?
0 comments
Please sign in to leave a comment.
Related articles