How to add clients (nodes?) to TheForeman

Hi there,

i'm trying to get into puppet and after some research for open source admin
interfaces i came across theforeman.
to see what is what i setup a new debian vm (7.5 wheezy) used the getting
started part on the foreman page and used the default settings with the

i watched the how2video on youtube
( and everything is working like
it is shown there.

the reason i'm looking into puppet and the foreman is that i want to use it
for software deployment, especially updatedeployment for a little tool we
so i wanted to manage an allready existing computer, running windows 7,
with theforeman gui/puppet.

prior to my theforeman installation, i did a test installation of just
puppet and where able to deploy files to the win7 vm. next logical step was
for me to get it into theforeman, i took the same aproach that worked with
puppet itself, i ran the windows puppetclient installer from the puppetlabs
website and expected to get it into my management interface from the

It did indeed show up as a new host, but it was marked with E for error and
checking the report showed the following errormessage:

Could not retrieve catalog from remote server: Error 400 on SERVER: Failed
when searching for node vmclient1.localdomain: Failed to find
vmclient1.localdomain via exec: Execution of '/etc/puppet/node.rb
vmclient1.localdomain' returned 1:

so i checked if the puppetmaster could resolve the hostname of the client,
ping it and if the client could so as well, turns out they do.
next item on my checklist where the file mentioned in the error message, i
did try to execute the node.rb with the above mentioned name
(vmclient1.localdomain) and the command return looked good.

puppetmaster: puppetforeman.localdomain
foreman_env: production
owner_name: Admin User
owner_email: root@localdomain
environment: production

i checked the permissions on the node.rb file, maybe something went wrong
there, so i changed it to everybody and left it with puppet/puppet as
owner/group as i was allready set up.

as for versions i used the puppetlabs repos for the foreman-installer which
installed puppet 3.6.2 for the puppetmaster and i used puppet 3.6.2 for the
windows client as well.

the next thing on my list was trying an older version, so i used the debian
repos for the foreman-installer which installed puppet 2.7.23 got the
windows client version 2.7.23 as well and the error message changed

"Could not retrieve catalog from remote server: Error 400 on SERVER: Could
not find node 'vmclient1.localdomain'; cannot compile."

I dont quiet understand where the error is located and what could go wrong?
fresh debian 7.5 wheezy install, followed the getting started, everything
on the server went as expected just the import of the windows client seems
to be a problem.
but why? how can you add windows clients? you get the puppetlabs windows
client and run it, i did, and since i didnt change anything it should at
least show up green in the foreman interface shouldnt it?

the whole process doesnt seem to be that complicated but i have no idea
where it goes down hill.

i'd be very happy to get some input, any tip is much appreciated


What are the contents of your Puppetmaster's site.pp file?


as i was looking for possible solutions for my problem, i was using an
older puppet version, the one throwing the "cannot compile" error, as i was
testing the node.rb vmclient1.localdomain with puppet 2.7.23 i couldnt run
those propperly anymore, i got an encoding error. that got my thinking so i
used an english client as my next testclient.

and as it turns out, i was showing me the same error at first, it was
running the manifest and after i added content for his manifest (added a
class) the error was gone alltogether.

so i was checking the /var/lib/puppet/yaml/facts files for differences
between the 2 languages, in the german version there are 2 umlauts in the
id and the timezone fact.
the id seemed propperly encoded but the timezone looks to be corrupt.

as i was using puppet without foreman before i found out about theforeman,
i looked the yaml files up and they have the same encoding problems, but
that somehow doesnt seem to stop puppet from running the manifest i created.

my initial thought would be, that in my puppet/foreman installation he
somehow chokes on the umlauts and therefore isnt creating the catalog for
the puppetrun?

i'd like to try and skip those facts to be gathered in the first place or
get the yaml files to be utf 8 encoded, so it will run without problems?
but i'm not quiet sure who is causing the problems, puppet is collecting
those facts and creates the yaml files as i understand it? but without
theforeman it doenst seem to bother him.

may the problem is something completly different and i am still looking at
the wrong one. but i would like to get some input, i hope there are some
german foreman users out there who maybe allready ran in something simillar.


hi Greg,

i didn't add anything to it, the line seemed to imply i'd rather not touch

"# Empty site.pp required (puppet #15106, foreman #1708)"


··· Am Mittwoch, 9. Juli 2014 17:29:04 UTC+2 schrieb Greg Sutcliffe: > > What are the contents of your Puppetmaster's site.pp file? > > Greg >

after some more testing:

it comes down to the facter of my windows client not beeing able to
propperly use utf 8 encoding?
the value i receive for my timezone is messed up: " timezone:
"Mitteleuropõische Sommerzeit" while it should be "Mitteleuropäische"
the fact that in the same file it is able to declare the id as id:
"nt-autorität\x5csystem" is really really strange, so facter uses propper
utf 8 on one fact but not on the other?

puppet doesnt seem to care as in my other setup it is running fine, but in
combination with foreman, that seems to cause problems i really like to get
fixed somehow.

my solution at the moment is deleting the timezone.rb file from the
facter/lib, after that the agent runs propperly, but that seems rather

any tipps i could use?

i did google a bit and found 2 possibile workarounds: having a
timezone.encode("UTF-8") in the timezone.rb, but that doesnt seem to work.
on the other hand would that be something i had to fix every time i add a
new client, so a centralized solutions is needed.
i tried adding some codefragment i found in another bug report, which was
trying to filter characters from the yaml files

filter any non-printable char from the value, if it is a String

puppet_facts['values'].each do |key, val|
if val.is_a? String
puppet_facts['values'][key] = val.scan(/[[:print:]]/).join

but that didnt have an effect on the client as well.

the problems would seem to be rather general and i'm wondering why there
isnt more to find on the subject.

as allways, any hint is appreaciated

greetings robert