I have a very strange issue with Puppet agent v3.8.6 on Windows (also seen the issue on Linux).
Every time I run 'puppet agent -t' to do a test run I get a Error: "
Could not retrieve catalog from remote server: Error 400 on SERVER: Error: Could not find data item users in any Hiera data file and no default supplied"
Here is the weirdness:
1.) No where in my hiera config or default modules etc am I using the users module it complains about.
2.) To temporarily resolve this issue, all I have to do is touch the module manifest. i.e. touch /etc/puppet/environments/.../modules/users/manifests/init.pp. Then when I re-run the agent it works. It then works 3-4 time after that then fails again.
2a.) turns out I can touch almost any file in my modules directory to temporarily fix the issue.
This seems like some sort of caching issue, but I am now banging my head against a wall to find the root cause of the problem and how to resolve it.
I have already picked through the debug output and removed everything I can from my hiera config. Nothing seems to remove this strange issue.
Has anyone else seen behavior like this? Any hints / clues as to where I should look to solve this?
Some additional config details:
In my current setup I have 1 class that gets applied via a single level hiera hierarchy which does nothing but output some logging.
I have gone through the users module (the one named in the error) with a fine tooth comb but in any case it still complains even when it is not included in ANY config.
I suspect puppet is walking the modules directory (for caching purposes?) and the 'users' module is the first one it hits and the error is not specific to users. I plan to test this by moving the users module out of the modules directory
I haven't got any top level declarations outside of the site manifest. As I say above, the strange thing is that I can touch any file in the modules path and the problem disappears for 3-4 cycles of the agent.
Thanks, James