Read more

vague puppet error messages with broken yaml files

Kim Klotz
November 27, 2014Software engineer at makandra GmbH

If you get one of this errors:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: (<unknown>): found character that cannot start any token while scanning for the next token at line 1297 column 3
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `empty?' for nil:NilClass at /etc/puppet/environments/production/manifests/nodes.pp:1 on node example.makandra.de
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

it's probably an error in your hiera yaml files.

In my case it was a facter variable I've used without quotes after a puppetmaster update (it was working for months before that).

Bad:

foo: %{::fqdn}

Good:

foo: "%{::fqdn}"

I've debugged the error like this:

  • deleted all yaml files one by one until the error didn't happend
  • comment out all lines in this yaml and removed the comments step by step until I've found the bad line
Posted by Kim Klotz to makandra dev (2014-11-27 22:35)