Node not found and 500 error on Puppet Run

Try changing the variables at the top of the script to:

:facts => true # no quotes, its a boolean, not a string
:storeconfigs => false

See if that helps. Basically node.rb is failing, and you can test it
by hand with "./node.rb <fqdn of test node>

··· n 5 October 2012 12:12, Ben Leedham wrote: > Hi, > > I had Puppet set up and it was running fine, I wanted to bring foreman in > (no storeconfigs). Foreman is receiving reports, it resolves my nodes but > when running puppet on the client it always says: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Could not find node 'ben-virtualbox2'; cannot compile

Thanks very much Greg.

I made the modifications (also changed the semicolon to a colon in the url
before the port number :P)

So now when I run node.rb manually I get this:

parameters:
foreman_env: &id001 production
domainname: [cleaned]
puppetmaster: 192.168.56.2
root_pw: xybxa6JUkz63w
environment: *id001
classes:
- demo

Which seems fine. Still getting the same error though saying that it could
not find the node, even though the node is showing up in foreman.

Any ideas?

Thanks.

··· On Saturday, October 6, 2012 12:24:15 PM UTC+1, Greg Sutcliffe wrote: > > n 5 October 2012 12:12, Ben Leedham <benjamin.el...@gmail.com> > wrote: > > Hi, > > > > I had Puppet set up and it was running fine, I wanted to bring foreman > in > > (no storeconfigs). Foreman is receiving reports, it resolves my nodes > but > > when running puppet on the client it always says: > > > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > > Could not find node 'ben-virtualbox2'; cannot compile > > Try changing the variables at the top of the script to: > > :facts => true # no quotes, its a boolean, not a string > :storeconfigs => false > > See if that helps. Basically node.rb is failing, and you can test it > by hand with "./node.rb >

> Thanks very much Greg.
>
> I made the modifications (also changed the semicolon to a colon in the url
> before the port number :P)

Always good :wink:

> So now when I run node.rb manually I get this:
>
> parameters:
> foreman_env: &id001 production
> domainname: [cleaned]
> puppetmaster: 192.168.56.2
> root_pw: xybxa6JUkz63w
> environment: *id001
> classes:
> - demo

That seems fine.

> Which seems fine. Still getting the same error though saying that it could
> not find the node, even though the node is showing up in foreman.
>
> Any ideas?

Did you run it as root? Do you get the same output as the 'puppet' user?

··· On 8 October 2012 13:01, Ben Leedham wrote:

Thanks again Greg.

Unfortunately I got exactly the same output whichever user I ran it as.

I was looking at the docs for ENC on puppetlabs and noticed that they
specified the puppet.conf sample like this:
node_terminus = exec
external_nodes = /etc/puppet/node.rb

Where as I originally had it like this:
external_nodes = /etc/puppet/node.rb
node_terminus = exec

So I swapped them around and that seems to have helped. Do you think that
is possible? Or have I done something else I can't remember? Which would be
frustrating.

Thanks again, at least my nodes are being picked up now.

··· On Monday, October 8, 2012 9:08:07 PM UTC+1, Greg Sutcliffe wrote: > > On 8 October 2012 13:01, Ben Leedham <benjamin.el...@gmail.com> > wrote: > > Thanks very much Greg. > > > > I made the modifications (also changed the semicolon to a colon in the > url > > before the port number :P) > > Always good ;) > > > So now when I run node.rb manually I get this: > > > > parameters: > > foreman_env: &id001 production > > domainname: [cleaned] > > puppetmaster: 192.168.56.2 > > root_pw: xybxa6JUkz63w > > environment: *id001 > > classes: > > - demo > > That seems fine. > > > Which seems fine. Still getting the same error though saying that it > could > > not find the node, even though the node is showing up in foreman. > > > > Any ideas? > > Did you run it as root? Do you get the same output as the 'puppet' user? >

> So I swapped them around and that seems to have helped. Do you think that is
> possible? Or have I done something else I can't remember? Which would be
> frustrating.

I don't think that would matter. I'm pretty sure Puppet loads the
whole file. Maybe though, I've never tested it :wink:

> Thanks again, at least my nodes are being picked up now.

Awesome. Enjoy :slight_smile:

··· On 9 October 2012 11:43, Ben Leedham wrote: