Returned 1: Exec format error - /etc/puppet/node.rb

> Gello,
>
> I have some concerns about the deployment of Foreman.

Which version of Foreman?

> Here is my system:
> Testjimmy Linux 2.6.32-5-amd64 # 1 SMP Sun September 23 10:07:46 UTC
> 2012 x86_64 GNU / Linux
>
> Debian 6.0.6 (Squeeze)
>
> I am foreman GUI that works, reports dating back correctly.
>
> The problem on my client:
>
> root@test1:~# puppetd --test
> info: Retrieving plugin
> info: Loading facts in ville
> info: Loading facts in updatable_pkgs
> info: Loading facts in client
> info: Loading facts in ville
> info: Loading facts in updatable_pkgs
> info: Loading facts in client
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Could not find node 'test1.xxxxx.org'; cannot compile
> warning: Not using cache on failed catalog
> err: Could not retrieve catalog; skipping run
>
> Puppet on my server / Foreman:
>
> root@testjimmy:~# curl -ks
> http://192.168.13.191/node/test1.xxxxx.org?format=yml
> —
> parameters:
> puppetmaster: 192.168.13.191
> foreman_env: &id001 production
> root_pw: xybxa6JUkz63w
> classes:
> - snmp
> environment: *id001
>
> ==> / Var / log / syslog <=
> Feb 21 10:21:56 testjimmy puppet-master[1923]: Failed to find
> test1.xxxxx.org via exec: Execution of '/etc/puppet/node.rb
> test1.xxxx.org' returned 1: Exec format error - /etc/puppet/node.rb

This looks suspicious, perhaps the file is missing the shebang line or
it's malformed?

If you've copied this from the templates rather than using the
installer, check you have removed the header lines at the top. It
should begin:

#!/usr/bin/env ruby

The variables in SETTINGS also need to be configured.

You can try running the script yourself, just make sure you do it as the
puppet user:

sudo -u puppet /etc/puppet/node.rb test1.xxxx.org

Do check the return code $? after running, as Puppet will too.

··· On 21/02/13 09:29, jimmy@goffaux.fr wrote:


Dominic Cleal
Red Hat Engineering