Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Puppet integration
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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 5 (0 open5 closed)

Related to Foreman - Bug #5881: CVE-2014-3491 - XSS from create/update/destroy notification boxesClosedJoseph Magen05/22/2014Actions
Related to Foreman - Bug #6903: "<br/>" in text when receiving error while deleting multiple hostsClosed08/04/2014Actions
Related to Foreman - Bug #2383: Pushing the "Certificates" button on a smart proxy with disabled PuppetCA throws cryptic ActiveRecord errorResolved04/09/2013Actions
Has duplicate Foreman - Bug #6429: Run Puppet causes Error 500 with message "Warning! undefined method `gsub' for #<Array:0x000000091b0608>"Duplicate06/28/2014Actions
Has duplicate Foreman - Bug #6351: <br /> seen in UI errors when multiple errors exist on a resourceDuplicate06/24/2014Actions
Actions #1

Updated by Jon Skarpeteig over 10 years ago

Should produce a proper error message instead of crashing

Actions #2

Updated by Dominic Cleal over 10 years ago

  • Related to Bug #5881: CVE-2014-3491 - XSS from create/update/destroy notification boxes added
Actions #3

Updated by Dominic Cleal over 10 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
Actions #4

Updated by Dominic Cleal over 10 years ago

  • Has duplicate Bug #6429: Run Puppet causes Error 500 with message "Warning! undefined method `gsub' for #<Array:0x000000091b0608>" added
Actions #5

Updated by Bryan Kearney over 10 years ago

  • Bugzilla link set to 1114639
Actions #6

Updated by Brian Rak over 10 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'

Actions #7

Updated by Roderick Day over 10 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)

  1. Allow puppet kick access
    path /run
    method save
    auth any
    allow *

"run puppet" feature now works a treat.

Actions #8

Updated by Roderick Day over 10 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

Actions #9

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
  • Target version set to 1.8.0
Actions #10

Updated by The Foreman Bot over 10 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1603 added
  • Pull request deleted ()
Actions #11

Updated by Dominic Cleal over 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #12

Updated by Dominic Cleal over 10 years ago

  • Has duplicate Bug #6351: <br /> seen in UI errors when multiple errors exist on a resource added
Actions #13

Updated by Dominic Cleal over 10 years ago

  • Related to Bug #6903: "<br/>" in text when receiving error while deleting multiple hosts added
Actions #14

Updated by Dominic Cleal about 10 years ago

  • Related to Bug #2383: Pushing the "Certificates" button on a smart proxy with disabled PuppetCA throws cryptic ActiveRecord error added
Actions

Also available in: Atom PDF