You updated some Puppet code. When you checked for syntax issues using puppet parser validate
, there were no issues. However, you are getting a 500
error in the console services log, and does not match schema
warning in the Puppet Server log.
Error messages and logs
In the console services log, on the primary server at /var/log/puppetlabs/console-services/console-services.log
2023-02-15 14:40:29,343 [qtp909839951-3205] INFO [p.c.class-updater] Requesting
classes in production from https://puppet:8140/puppet/v3/environment_classes?environment=production
2023-02-15 14:40:32,585 [qtp909839951-3205] ERROR [p.c.class-updater] 500 response
received for request for classes in production.
In the Puppet Server log, on the primary server at /var/log/puppetlabs/puppetserver/puppetserver.log
2023-02-15T15:08:31.030-05:00 WARN [qtp798291301-1059905] [o.e.j.s.HttpChannel] /puppet/v3/environment_classes clojure.lang.ExceptionInfo: Output of manifest-info-from-jruby->manifest-info-for-json does not match schema: {:classes [{:params [nil {:type (not (instance? java.lang.String nil))} nil]}]} at puppetlabs.services.primary.server_core$fn__29665$manifest_info_from_jruby__GT_manifest_info_for_json__29670.invoke(master_core.clj:269)
These errors occur when there is a type
that is incorrectly scoped that passes puppet parser validate
.
This example, with Array[String]
scoped as an array, causes the issue:
Variant[String,[Array[String]]] $provisioning_api_certs = [],
Having the array inside an array changes the scope of this parameter and causes errors due to a bug.
To avoid the issue, you can change the example to:
Variant[String,Array[String]] $provisioning_api_certs = [],
Version and installation information
PE version: All supported
Solution
You can determine which environment the issue is in by running the following on your primary server, replacing with one of your environments. If that environment includes incorrectly scoped types, the output will include 500 errors. Cycle through your environments with this command until you find the environment or environments with issues.
curl https://$(hostname -f):8140/puppet/v3/environment_classes?environment=<ENVIRONMENT> --cert $(puppet config print hostcert) --key $(puppet config print hostprivkey) --cacert $(puppet config print localcacert)
Check though code in the environment with the issue and correct it.
How can we improve this article?
0 comments
Please sign in to leave a comment.
Related articles