1

Running Puppet, I get the following error:

$ sudo /opt/puppetlabs/bin/puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Invalid tag '#<puppet::resource::type:0x5d1c8c0d>' at /etc/puppetlabs/code/environments/production/modules/haproxy/manifests/listen.pp:121:6 at /etc/puppetlabs/code/environments/production/manifests/site.pp:1075 on node steven.ca.seevibes.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

manifests/site.pp includes the following:

 704 node 'steven.ca.seevibes.com' {
       ...
1048   class{'haproxy':
1049     service_ensure  => running,
1050     package_ensure  => present,
1051     restart_command => '/usr/bin/service haproxy reload',
1052     global_options  => {
1053       log           => '/dev/log local0',
1054       pidfile       => '/var/run/haproxy.pid',
1055       maxconn       => 4000,
1056       user          => 'haproxy',
1057       group         => 'haproxy',
1058       daemon        => '',
1059       stats         => 'socket /var/lib/haproxy/stats', },
1060     defaults_options => {
1061       log     => 'global',
1062       option  => [ 'redispatch', ],
1063       retries => 3,
1064       maxconn => 500,
1065       timeout => [
1066         'http-request 10s',
1067         'queue 1m',
1068         'connect 10s',
1069         'client 1m',
1070         'server 1m',
1071         'check 10s', ],
1072     }
1073   }
1074
1075   haproxy::listen{'console-rabbitmq':
1076     ipaddress => $ipaddress,
1077     ports     => '15672',
1078     mode      => 'http',
1079     options   => {
1080       balance => 'roundrobin',
1081       mode    => 'http',
1082       timeout => [ 'server 1m', 'client 1m', ],
1083       option  => [
1084         'httplog',
1085         'httpchk',
1086       ],
1087     },
1088   }
       ...
1276 }

And the exact line where this breaks is (based on github.com/puppetlabs/puppetlabs-haproxy@f8c5f27):

 86 define haproxy::listen (
 87   $ports                        = undef,
      ...
 99   $section_name                 = $name,
      ...
104 ) {
      ...
121   if defined(Haproxy::Backend[$section_name]) {
122     fail("An haproxy::backend resource was discovered with the same name (${section_name}) which is not supported")
123   }

I do not myself instantiate haproxy::backend resources: I only use haproxy::listen.

I'm at a loss to debug this.

According to what I read in the code, I would have expected $section_name to equal console-rabbitmq, but it's not.

$ puppet --version
4.6.2
$ puppetserver --version
puppetserver version: 2.5.0

1 Answer 1

1

This appears to be an issue with the location of that tag in memory and the puppetserver service will need restarted. This worked for me:

[rnelson0@puppet ~]$ sudo puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Invalid tag '#<puppet::resource::type:0x5b351356>' at /etc/puppetlabs/code/environments/production/modules/postgresql/manifests/server/db.pp:17:8 at /etc/puppetlabs/code/environments/production/modules/puppetdb/manifests/database/postgresql.pp:26 on node puppet.nelson.va
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
[rnelson0@puppet ~]$ sudo systemctl restart puppetserver
[rnelson0@puppet ~]$ tail -f /var/log/messages
tail: cannot open ‘/var/log/messages’ for reading: Permission denied
tail: no files remaining
[rnelson0@puppet ~]$ sudo tail -f /var/log/messages
Oct  6 12:02:46 puppet systemd: Stopping puppetserver Service...
Oct  6 12:02:47 puppet systemd: Starting puppetserver Service...
Oct  6 12:02:47 puppet java: OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Oct  6 12:03:25 puppet systemd: Started puppetserver Service.
Oct  6 12:03:57 puppet puppet-agent[22351]: (/Stage[main]/Profile::Base/Exec[shosts.equiv]/returns) executed successfully
Oct  6 12:03:59 puppet puppet-agent[22351]: Applied catalog in 6.18 seconds

See https://tickets.puppetlabs.com/browse/PUP-6679

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .