Reese Knowledgebase

Error 400 on SERVER: Could not find class puppet_enterprise

View Kristian Reese's profile on LinkedIn

If you like this article, please +1 or Recommend via FB with the provided buttons above:

Article ID: 169
by: Reese K.
Posted: 14 Nov, 2015
Last updated: 14 Nov, 2015
Views: 1931

Error 400 on SERVER: Could not find class puppet_enterprise

I am running Puppet Enterprise 2015.2.2 and suddenly, many of my agents began reporting the following:

Error 400 on SERVER: Could not find class puppet_enterprise

Since this is a PE classification, I knew that the agent(s), for one reason or another, could not identify the modulepath.  Puppet should be able to identify the modulepath as the default value is ./modules:$basemodulepath.  However, I am setting modulepath inside environment.conf within each branch of my puppet-control because I want to include a site directory which contains my roles and profiles.

I first looked here to make sure that $basemodulepath was at the end of modulepath, as follows:

modulepath = site:modules:$basemodulepath
environment_timeout = 0

If you want an environment to have access to the global module directories, it should include $basemodulepath.  Since it was there, I was befuddled as to why I was getting that pesky ERROR 400.  The only thing I could think of was that puppet was unable to decipher the content of environment.conf for one reason or another, so I decided to cat environment.conf with the option to show-nonprinting characters as follows:  cat -vet environment.conf

Before my eyes appeared those ugly ass ^M Microsoft Carriage Return characters!  Somebody had pushed to the control repo files with ^M making it difficult for puppet to parse environment.conf and interpret the value for modulepath.  After running the "corrupted" environment.conf file through a dos2unix conversion and pushing it to the control repo, the problem was resolved and the puppet agents ran successfully on the next run.

This article was:   Helpful | Not Helpful
External links

Prev   Next
Using puppet-classify to interface with the classifier service     Could not request certificate