Detail: uninitialized constant Puppet::Parser::TemplateWrapper::Mysql

137 views
Skip to first unread message

Manoj Kumar

unread,
Jul 21, 2015, 1:30:58 PM7/21/15
to puppet...@googlegroups.com
Hi All,

I am getting following error while running "puppet agent"

puppet agent -tv
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Unable to add resolve nil for fact ks_memsql_nodeid: undefined method `num_rows' for "Error: 2003":String
Unable to add resolve nil for fact ks_memsql_state: undefined method `num_rows' for nil:NilClass

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template nrpe/ks_nrpe_cfg.erb:

  Filepath: /opt/p19/puppet/modules/nrpe/templates/ks_nrpe_cfg.erb
  Line: 28
  Detail: uninitialized constant Puppet::Parser::TemplateWrapper::Mysql

 at /opt/p19/puppet/modules/nrpe/manifests/config.pp:27 on node p19-d-aggrmanojmaster-001.uk19.kexpress.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run


When I look at Puppet Master for File /opt/p19/puppet/modules/nrpe/templates/ks_nrpe_cfg.erb at line No. 28, it has following line

rescue Mysql::Error => er


Then I tried copying /opt/p19/puppet/modules/nrpe/templates/ks_nrpe_cfg.erb  in a test.rb file and executed after adding "require 'mysql' " that worked fine


Can anyone please help me on this? or if anyone can let me know if we can add "require 'mysql' " in template or anyother way to achieve this?
Reply all
Reply to author
Forward
0 new messages