Puppet: Error 400 on SERVER ArgumentError: malformed format string – %S at …

Here's an error to screw with your debugging skills.

~$ puppet agent -t
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/vmwaretools_version.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: malformed format string - %S at /etc/puppet/manifests/yourhosntame.pp:13 on node [yournodename]
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

There's probably nothing wrong with either the syntax or the data inside your manifests or modules. In fact, the line-number in the error could point you to a completely unrelated place in your code.

What's more than likely to cause the problem is external data like hiera. If you're using a yaml/xml/mysql backend, make sure the data in it is valid and not malformed. When using yaml, check the syntax and the encoding of all your entities and attributes.

Hi! This is a blog where I write down solutions to some of the problems I've faced when working as a sysadmin/dev. I hope you find the information shown here useful to you. Please use the comments on this blog to give feedback about the content!. I'm @mattiasgeniar on Twitter.

Posted in linux
One comment on “Puppet: Error 400 on SERVER ArgumentError: malformed format string – %S at …
  1. Bill says:

    Thank you! An extra comma in one of my hiera files was the culprit when i saw this error.

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>