<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Package: puppet-agent<br>
      Version: 7.20.0</p>
    <p>Puppet is occasionally logging an exception in syslog<br>
      ... <i>MSG: undefined method message for #String ...</i></p>
    <p><i>I tracked this done to calls to the log_exception(exception)
        method in <br>
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/logging/logger.rb</i></p>
    <p><i>log_exception(exception) is expecting an exception class, but
        when called from these two places, it is being passed a String,
        hence the error message<br>
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/custom_facts/util/fact.rb<br>
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/custom_facts/util/collection.rb</i></p>
    <p><i>either </i><i>logger.rb should handle String arguments, or it
        shouldn't be being called with String arguments.</i></p>
    <p><i>A quick fix to logger.rb would be <br>
      </i></p>
    <pre class="c-mrkdwn__pre" data-stringify-type="pre" style="box-sizing: inherit; margin: 4px 0px; padding: 8px; --saf-0:rgba(var(--sk_foreground_low,29,28,29),0.13); overflow-wrap: break-word; font-size: 12px; font-variant-ligatures: none; line-height: 1.50001; tab-size: 4; white-space: pre-wrap; word-break: normal; font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; background: rgba(var(--sk_foreground_min,29,28,29),0.04); border: 1px solid var(--saf-0); border-radius: 4px; counter-reset: list-0 0 list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; color: rgb(29, 28, 29); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">    def log_exception(exception)
      if exception.respond_to?(:message)
        msg = exception.message
        msg += "\n" + exception.backtrace.join("\n") if Options[:trace]
      else
        msg = exception
      end

      error(msg, true)
    end</pre>
    <p><i></i></p>
    <pre class="moz-signature" cols="0"></pre>
    <p>Alternately, fact.rb and collection.rb could pass through the
      exception, or handle the backtrace themselves.</p>
    <pre class="moz-signature" cols="0">
-- 
Rob Burrowes                    
Senior eResearch Platform and Services Engineer                                         

Centre for eResearch            <a class="moz-txt-link-freetext" href="https://wiki.auckland.ac.nz/display/CERES/Centre+for+eResearch">https://wiki.auckland.ac.nz/display/CERES/Centre+for+eResearch</a>
Building 302, Room 590          Ph:   +64 9 923 2308 (Internal 82308)
23 Symonds Street               Cell: +64 27 4731856 (internal 64209)

The University of Auckland      <a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/rob-burrowes-7a5a8a56">https://www.linkedin.com/in/rob-burrowes-7a5a8a56</a>
Private Bag 92019               <a class="moz-txt-link-freetext" href="http://www.burrowes.org/">http://www.burrowes.org/</a>
Auckland Mail Centre            <a class="moz-txt-link-freetext" href="http://www.wikarekare.org/">http://www.wikarekare.org/</a>
Auckland 1142                   orcid.org/0000-0002-8647-6012
NEW ZEALAND
</pre>
  </body>
</html>