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 online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
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)