Project

General

Profile

Actions

Bug #6429

closed

Run Puppet causes Error 500 with message "Warning! undefined method `gsub' for #<Array:0x000000091b0608>"

Added by Paolo Larcheri almost 10 years ago. Updated almost 10 years ago.

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

Description

In order to have the puppetrun features enabled I configured Foreman and the puppet clients as documented here:
http://projects.theforeman.org/projects/foreman/wiki/Puppetrun

When I click on "Run Puppet" I get exactly what reported in the Subject.

In production.log I found these:

Started GET "/hosts/eca86bf602f9/puppetrun" for 10.10.0.2 at 2014-06-28 23:47:31 +0200
Processing by HostsController#puppetrun as HTML
Parameters: {"id"=>"eca86bf602f9"}
Operation FAILED: undefined method `gsub' for #<Array:0x000000091b0608>
Rendered common/500.html.erb within layouts/application (3.7ms)
Rendered layouts/base.html.erb (1.7ms)
Completed 500 Internal Server Error in 2323.9ms (Views: 7.2ms | ActiveRecord: 0.6ms)

On the client not traffic is received on the port TCP/8139.
Let me know if you need more info.
Paolo Larcheri


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #6402: Using "run puppet" feature fails: undefined method `gsub' for #<Array ...>ClosedDominic Cleal06/26/2014Actions
Actions #1

Updated by Ohad Levy almost 10 years ago

do you happen to get a full trace in the UI?

Actions #2

Updated by Paolo Larcheri almost 10 years ago

No full trace.

I found out this:

root@server:/var/lib/puppet/ssl/ca/signed# cat /var/log/foreman-proxy/foreman-proxy.log
W, [2014-06-29T21:59:35.787348 #9917] WARN -- : Non-null exit code when executing '["/usr/bin/sudo", "/usr/sbin/puppetrun", "--host", "eca86bf602f9.blabla"]'
E, [2014-06-29T21:59:35.829982 #9917] ERROR -- : Failed puppet run: Check Log files
W, [2014-06-29T22:02:27.153217 #9917] WARN -- : Non-null exit code when executing '["/usr/bin/sudo", "/usr/sbin/puppetrun", "--host", "eca86bf602f9.blabla"]'
E, [2014-06-29T22:02:27.153830 #9917] ERROR -- : Failed puppet run: Check Log files

So I run the command from a shell and I got a "forbidden" from the client.
It turned out the servername specified in the client auth.conf was wrong.

Anyway, a more meaningful message in the UI would be a good thing :-)

Thanks for the time
PL

Actions #3

Updated by Dominic Cleal almost 10 years ago

  • Is duplicate of Bug #6402: Using "run puppet" feature fails: undefined method `gsub' for #<Array ...> added
Actions #4

Updated by Dominic Cleal almost 10 years ago

  • Status changed from New to Duplicate

Thanks, we're tracking this in #6402.

Actions

Also available in: Atom PDF