New foreman user. problems getting node working

So I have a fresh foreman install on Centos 7.1. I can get to the web
admin page fine. I just tried to set up the first node on an existing
machine. The certificate signing went fine but I can't get it working. I
have no idea what to look for.

[root@<node> ~]# puppet agent --test --noop
Warning: Unable to fetch my node definition, but the agent run will
continue:
Warning: Error 400 on SERVER: Failed to find <node> via exec: Execution of
'/etc/puppet/node.rb <node>' returned 1:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Failed when searching for node <node>: Failed to find <node> via exec:
Execution of '/etc/puppet/node.rb <node>' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

[root@<master> ~]# /etc/puppet/node.rb <node>
Error retrieving node <node>: Net::HTTPNotFound
Check Foreman's /var/log/foreman/production.log for more information.

I've looked in production.log but there doesn't appear to be anything in
there related to the node. I'm sure I'm missing something silly but I
haven't a clue where to look for it. Could someone help? :slight_smile:

Hello Chris,

is the node you're trying to run puppet on defined in foreman?
Can you find it under hosts > all hosts?

··· On Wednesday, July 1, 2015 at 9:01:22 PM UTC+2, Chris Ober wrote: > > So I have a fresh foreman install on Centos 7.1. I can get to the web > admin page fine. I just tried to set up the first node on an existing > machine. The certificate signing went fine but I can't get it working. I > have no idea what to look for. > > [root@ ~]# puppet agent --test --noop > Warning: Unable to fetch my node definition, but the agent run will > continue: > Warning: Error 400 on SERVER: Failed to find via exec: Execution of > '/etc/puppet/node.rb ' returned 1: > Info: Retrieving pluginfacts > Info: Retrieving plugin > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Failed when searching for node : Failed to find via exec: > Execution of '/etc/puppet/node.rb ' returned 1: > Warning: Not using cache on failed catalog > Error: Could not retrieve catalog; skipping run > > [root@ ~]# /etc/puppet/node.rb > Error retrieving node : Net::HTTPNotFound > Check Foreman's /var/log/foreman/production.log for more information. > > > I've looked in production.log but there doesn't appear to be anything in > there related to the node. I'm sure I'm missing something silly but I > haven't a clue where to look for it. Could someone help? :) >

Hello Chris,

I am facing the same issues (maybe).
What happens if you try to run following command at your foreman-host:

[root@<foreman-host> ~]# /etc/puppet/node.rb <node>

If it results in the same Error (Error retrieving node <node>:
Net::HTTPNotFound) you could try to run the same command as the puppet-user:

[root@<foreman-host> ~]# sudo -u puppet /etc/puppet/node.rb <node>

And if this works, you are one step further and maybe someone can help to
point out how to solve this issue.

Mike

··· On Wednesday, July 1, 2015 at 9:01:22 PM UTC+2, Chris Ober wrote: > > So I have a fresh foreman install on Centos 7.1. I can get to the web > admin page fine. I just tried to set up the first node on an existing > machine. The certificate signing went fine but I can't get it working. I > have no idea what to look for. > > [root@ ~]# puppet agent --test --noop > Warning: Unable to fetch my node definition, but the agent run will > continue: > Warning: Error 400 on SERVER: Failed to find via exec: Execution of > '/etc/puppet/node.rb ' returned 1: > Info: Retrieving pluginfacts > Info: Retrieving plugin > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Failed when searching for node : Failed to find via exec: > Execution of '/etc/puppet/node.rb ' returned 1: > Warning: Not using cache on failed catalog > Error: Could not retrieve catalog; skipping run > > [root@ ~]# /etc/puppet/node.rb > Error retrieving node : Net::HTTPNotFound > Check Foreman's /var/log/foreman/production.log for more information. > > > I've looked in production.log but there doesn't appear to be anything in > there related to the node. I'm sure I'm missing something silly but I > haven't a clue where to look for it. Could someone help? :) >

On Wednesday, July 1, 2015 at 9:01:22 PM UTC+2, Chris Ober wrote:

So I have a fresh foreman install on Centos 7.1. I can get to the web
admin page fine. I just tried to set up the first node on an existing
machine. The certificate signing went fine but I can’t get it working. I
have no idea what to look for.

[root@ ~]# puppet agent --test --noop
Warning: Unable to fetch my node definition, but the agent run will
continue:
Warning: Error 400 on SERVER: Failed to find via exec: Execution of
’/etc/puppet/node.rb ’ returned 1:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Failed when searching for node : Failed to find via exec:
Execution of '/etc/puppet/node.rb ’ returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

[root@ ~]# /etc/puppet/node.rb
Error retrieving node : Net::HTTPNotFound
Check Foreman’s /var/log/foreman/production.log for more information.

I’ve looked in production.log but there doesn’t appear to be anything in
there related to the node. I’m sure I’m missing something silly but I
haven’t a clue where to look for it. Could someone help? :slight_smile:

On Wednesday, July 1, 2015 at 9:01:22 PM UTC+2, Chris Ober wrote:

So I have a fresh foreman install on Centos 7.1. I can get to the web
admin page fine. I just tried to set up the first node on an existing
machine. The certificate signing went fine but I can’t get it working. I
have no idea what to look for.

[root@ ~]# puppet agent --test --noop
Warning: Unable to fetch my node definition, but the agent run will
continue:
Warning: Error 400 on SERVER: Failed to find via exec: Execution of
’/etc/puppet/node.rb ’ returned 1:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Failed when searching for node : Failed to find via exec:
Execution of '/etc/puppet/node.rb ’ returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

[root@ ~]# /etc/puppet/node.rb
Error retrieving node : Net::HTTPNotFound
Check Foreman’s /var/log/foreman/production.log for more information.

I’ve looked in production.log but there doesn’t appear to be anything in
there related to the node. I’m sure I’m missing something silly but I
haven’t a clue where to look for it. Could someone help? :slight_smile: