vague puppet error messages with broken yaml files

Posted . Visible to the public.

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

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
Last edit
Thomas Eisenbarth
License
Source code in this card is licensed under the MIT License.
Posted by Kim Klotz to makandra dev (2014-11-27 21:35)