Error 400 on SERVER: undefined method `empty?’ for nil:NilClass

image_pdfimage_print

After updating a hiera yaml file, I got this error:


Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `empty?' for nil:NilClass at /etc/puppet/environments/production/manifests/site.pp:1 on node dc1-prd-git01.medic
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Solution:
There is a broken hash somewhere in the yaml file. In other words, I’ve got a syntax error.  A more specific error message would have been helpful.

For example
143 allow 80 on eth0 for aws-sta-back-app11:
port: 80
proto: tcp
iniface: eth0
source: 54.194.203.135
destination: 0.0.0.0/0
action: accept

I was missing the first colon (in red)

Leave a Reply

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

Comments Protected by WP-SpamShield Spam Blocker