Bug #6402
Using "run puppet" feature fails: undefined method `gsub' for #<Array ...>
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
Related issues
Associated revisions
fixes #6402 - use standard success/error handlers in UI controllers
(cherry picked from commit b4fbdf574faf364fb1fc991c9363b3637ae70906)
History
#1
Updated by Jon Skarpeteig almost 8 years ago
Should produce a proper error message instead of crashing
#2
Updated by Dominic Cleal almost 8 years ago
- Related to Bug #5881: CVE-2014-3491 - XSS from create/update/destroy notification boxes added
#3
Updated by Dominic Cleal almost 8 years ago
- Subject changed from Using "run puppet" feature fails to Using "run puppet" feature fails: undefined method `gsub' for #<Array ...>
- Category set to Puppet integration
#4
Updated by Dominic Cleal almost 8 years ago
- Has duplicate Bug #6429: Run Puppet causes Error 500 with message "Warning! undefined method `gsub' for #<Array:0x000000091b0608>" added
#5
Updated by Bryan Kearney almost 8 years ago
- Bugzilla link set to 1114639
#6
Updated by Brian Rak almost 8 years ago
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'
#7
Updated by Roderick Day almost 8 years ago
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.
#8
Updated by Roderick Day almost 8 years ago
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
#9
Updated by Dominic Cleal almost 8 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
- Target version set to 1.8.0
#10
Updated by The Foreman Bot almost 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1603 added
- Pull request deleted (
)
#11
Updated by Dominic Cleal almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset b4fbdf574faf364fb1fc991c9363b3637ae70906.
#12
Updated by Dominic Cleal almost 8 years ago
- Has duplicate Bug #6351: <br /> seen in UI errors when multiple errors exist on a resource added
#13
Updated by Dominic Cleal almost 8 years ago
- Related to Bug #6903: "<br/>" in text when receiving error while deleting multiple hosts added
#14
Updated by Dominic Cleal over 7 years ago
- Related to Bug #2383: Pushing the "Certificates" button on a smart proxy with disabled PuppetCA throws cryptic ActiveRecord error added
fixes #6402 - use standard success/error handlers in UI controllers