Ask Your Question
1

How do you get puppet 4 to list errors found instead of saying "Could not parse for environment dev: Found 2 errors."

asked 2015-09-02 17:28:08 -0600

billjamzz2 gravatar image

updated 2015-09-04 17:20:41 -0600

ramindk gravatar image
[root@billj6 test yum.repos.d]# puppet agent -t 
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment dev: Found 2 errors. Giving up in /etc/puppetlabs/code/manifests/test.pp on node billj6.test.
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

What are the 2 errors?

edit retag flag offensive close merge delete

Comments

Are the errors listed in the Puppet Server log file (/var/log/puppetlabs/puppetserver/puppetserver.log)?

csharpsteen gravatar imagecsharpsteen ( 2015-09-02 17:50:43 -0600 )edit

log file just says the same thing. It would be nice if it would at least say line number. I didi find the problem, I declared class and forgot to name it. d'oh! Also have seem same issue when using variables starting with capital letters. :-(

billjamzz2 gravatar imagebilljamzz2 ( 2015-09-02 18:41:22 -0600 )edit

Please post a link to a pastebin of your source file, and that might help someone here to troubleshoot it.

GregLarkin gravatar imageGregLarkin ( 2015-09-04 20:11:37 -0600 )edit

This is kind of infuriating another good example of when more information would be nice is the > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: ... If you have a large code base this could be coming from lots of different places.

BWDennis gravatar imageBWDennis ( 2017-02-22 05:30:59 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-09-03 10:00:14 -0600

would suggest running puppet parser validate and puppet lint on any new modules you write as these can pick up errors.

if these output ok and yet still get an error I'd try and do puppet agent -t -d (debug) which gives more info.

edit flag offensive delete link more

Comments

good suggestions, but niether gives any useful info. parser saw no issues, but then issue wasn't with manifest file. --debug didn't say anything useful either. Still would like to see puppet agent give line number instead of just saying "giving up".

billjamzz2 gravatar imagebilljamzz2 ( 2015-09-03 10:19:08 -0600 )edit
0

answered 2015-09-08 02:19:35 -0600

Usually you can find the answer on the master.

grep "ERROR"

in the server output or in the server master log helps here. When we had this issue we found the real error messages somewhat near the "Found 2 errors" message in the log and the server stdout.

Here is one example:

ERROR [puppet-server] Puppet Illegal expression. A Reserved Word 'type' is unacceptable as function name in a Function Call
ERROR [puppet-server] Puppet Use of reserved word: type, must be quoted if intended to be a String value
ERROR [puppet-server] Puppet Found 2 errors. Giving up
ERROR [puppet-server] Puppet Found 2 errors. Giving up in /etc/puppetlabs/puppet/environments/[...]

The last line also indicates where you might find the cause of the issue

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-09-02 17:28:08 -0600

Seen: 1,793 times

Last updated: Sep 08 '15