Error 400 on SERVER ... undefined method 'environment'

asked 2016-06-05 21:57:35 -0600

peske gravatar image

Hi guyz

This issue drives me crazy these days. But let's start from the beginning:

  • I'm using puppet server 2.4.0 (for several months now), and everything worked well 'till few days ago;
    • The same server is shared with Zabbix server. My environment is small so I've implemented both (puppet and zabbix) on the same box. Again, everything was working flawlessly.
    • The only change I've made (or at least I'm aware of) is that I've installed zabbix-java-gateway on the same box few days ago.

Not immediately with zabbix-java-gateway, but very soon after the issue started. The very strange thing about the issue is that it looks like it arises suddenly, with no obvious reason, lasts a while (10min to few hours) during which period all puppet agents are throwing the same exact error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, undefined method `environment' for #<Puppet::Node::Environment:0x7d5a4cc0> at /etc/puppetlabs/code/environments/production/modules/ANYMODULE/manifests/init.pp:33:7 on node ANYHOST

(I've changed uppercase part.)

Then again without an obvious reason everything starts working normally.

I've googled about "undefined method environment" and I've saw that there were few reported cases, but I wasn't able to find out what exactly was causing the error, nor how it is resolved.

Does anyone have any experience with this? Any help would be appreciated - this drives me crazy...


edit retag flag offensive close merge delete