The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:
Puppet fails with opaque error message due to metadata.json syntax error
|Status:||Needs Decision||Start date:||08/06/2012|
|Assignee:||J.D. Welch||% Done:|
|Affected Puppet version:||Branch:|
Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com
Error message is:
Error 400 on SERVER: Could not parse for environment production: expected next name, value pair in object at '} '! at /home/puppet/main/manifests/site.pp:3 on node hostname.fqdn
I was getting this error message generated against the second line of my site.pp until I made the following change to our Puppet code:
diff --git a/main/modules/cacti/metadata.json b/main/modules/cacti/metadata.json index c235951..6fa36c1 100644 --- a/main/modules/cacti/metadata.json +++ b/main/modules/cacti/metadata.json @@ -6,5 +6,5 @@ "puppetversion": "0.24", "summary": "Standard Apache module", "description": "This module can be used for basic Apache management", - "project_page": "http://www.example42.com", + "project_page": "http://www.example42.com" }}
Our site.pp looks like this.
import "sites/*.pp" import "roles/*.pp" import "roles/app_server/*.pp"
If I swapped the first and second lines around I received the same error (ie with the error indicating the problem was with import “roles/*.pp”).
I found the solution here and with Ryan’s help on IRC: http://projects.puppetlabs.com/issues/4142#note-3
It was introduced after updating 2.7.11 –> 2.7.18. Ryan thought it might be related to this change in 2.7.16: “Significantly improve compilation performance when using modules”
My ideal fix would be to make the error message more descriptive, not consider this trailing comma an error (like 2.7.11), and to not consider an unparseable metadata.json a critical error.