Bug #6402
closed
Using "run puppet" feature fails: undefined method `gsub' for #<Array ...>
Added by Jon Skarpeteig over 10 years ago.
Updated over 6 years ago.
Category:
Puppet integration
|
Description
Warning!
undefined method `gsub' for #<Array:0x00000008e13478>
If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.
NoMethodError
undefined method `gsub' for #<Array:0x00000008e13478>
app/controllers/application_controller.rb:172:in `error'
app/controllers/hosts_controller.rb:193:in `puppetrun'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
Log from client:
puppet-agent[6949]: Forbidden request: foreman(10.0.0.10) access to /run/client.fqdn [save] authenticated at :54
Should produce a proper error message instead of crashing
- Related to Bug #5881: CVE-2014-3491 - XSS from create/update/destroy notification boxes added
- Subject changed from Using "run puppet" feature fails to Using "run puppet" feature fails: undefined method `gsub' for #<Array ...>
- Category set to Puppet integration
- Has duplicate Bug #6429: Run Puppet causes Error 500 with message "Warning! undefined method `gsub' for #<Array:0x000000091b0608>" added
- Bugzilla link set to 1114639
I also saw this when the foreman-proxy service was stopped, and I attempted to retrieve a certificate list.
Backtrace:
NoMethodError
undefined method `gsub' for #<ActiveRecord::RecordNotFound: ActiveRecord::RecordNotFound>
app/controllers/application_controller.rb:172:in `error'
app/controllers/puppetca_controller.rb:17:in `rescue in index'
app/controllers/puppetca_controller.rb:7:in `index'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
I was just seeing this same behavior with Foreman 1.5.1 and Puppet 3.6.2. Solved it by adding the following to my client's auth.conf (/etc/puppet/auth.conf)
- Allow puppet kick access
path /run
method save
auth any
allow *
"run puppet" feature now works a treat.
I should add that in the client log I saw the following:
Tue Jul 15 20:09:29 +0000 2014 Puppet (warning): Denying access: Forbidden request: puppet.example.com(<ip_address>) access to /run/hostname.example.com [save] authenticated at :119
Tue Jul 15 20:09:29 +0000 2014 Puppet (err): Forbidden request: puppet.example.com(<ip_address>) access to /run/hostname.example.com [save] authenticated at :119
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
- Target version set to 1.8.0
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1603 added
- Pull request deleted (
)
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Has duplicate Bug #6351: <br /> seen in UI errors when multiple errors exist on a resource added
- Related to Bug #6903: "<br/>" in text when receiving error while deleting multiple hosts added
- Related to Bug #2383: Pushing the "Certificates" button on a smart proxy with disabled PuppetCA throws cryptic ActiveRecord error added
Also available in: Atom
PDF