New install help -- Foreman points to wrong URL?

> Hello
>
> I have installed puppet (puppetlabs repo) and foreman (using the guide
> on the website)… When I call puppet agent -t from the client it tries
> to fetch the URL on remote host.
>
> - - [25/Feb/2013:04:04:02 -0500] "GET
> /production/node/host11.mydomain.net? HTTP/1.1" 400 123 "-" "-"
> - - [25/Feb/2013:04:04:02 -0500] "GET
> /production/file_metadatas/plugins?links=manage&recurse=true&ignore=—+%0A+±+%22.svn%22%0A+±+CVS%0A+±+%22.git%22&checksum_type=md5&
> HTTP/1.1" 200 294 "-" "-"
> - - [25/Feb/2013:04:04:03 -0500] "POST
> /production/catalog/host11.mydomain.net HTTP/1.1" 400 180 "-" "-"
> - - [25/Feb/2013:04:04:03 -0500] "PUT
> /production/report/host11.mydomain.net HTTP/1.1" 200 16 "-" "-"
>
> However foreman public at http://ipaddr:80/ (not in a "production" sub
> folder)…

That looks ok - the Puppet agent is querying the puppetmaster, which
will then call the /etc/puppet/node.rb script which then calls Foreman.

> On client I receive
>
>
> Warning: Unable to fetch my node definition, but the agent run will
> continue:
> Warning: Error 400 on SERVER: Failed to find host11.mydomain.com via
> exec: Execution of '/etc/puppet/node.rb host11.mydomain.com' returned 1:
>
> Info: Retrieving plugin
> Error: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Failed when searching for node host11.mydomain.com: Failed to
> find host11.mydomain.com via exec: Execution of '/etc/puppet/node.rb
> host11.mydomain.com' returned 1:
>
>
> How do I change this, or is this normal setup and something else is not
> configured right?

At the end of the quickstart, there's a step where you need to add a
Smart Proxy to Foreman - double check that you've done this:

Log into Foreman, click on More, Configuration, Smart Proxies and add a
new proxy with the URL https://fqdn:8443/. This will enable Puppet class
imports from your new puppet master.

Try the Puppet run again and see if it works. If not, check
/var/log/foreman/production.log and you should see a query for
externalNodes which might provide some more information. You can also
run the node.rb yourself, just make sure you do it as the Puppet user:
"sudo -u puppet /etc/puppet/node.rb host11.mydomain.com".

··· On 25/02/13 09:11, ateamrules@gmail.com wrote:


Dominic Cleal
Red Hat Engineering

I found the same problem.

how slove?

在 2013年2月25日星期一UTC+8下午5时17分22秒,Dominic Cleal写道:

··· > On 25/02/13 09:11, ateam...@gmail.com wrote: > > Hello > > > > I have installed puppet (puppetlabs repo) and foreman (using the guide > > on the website).. When I call puppet agent -t from the client it tries > > to fetch the URL on remote host. > > > > - - [25/Feb/2013:04:04:02 -0500] "GET > > /production/node/host11.mydomain.net? HTTP/1.1" 400 123 "-" "-" > > - - [25/Feb/2013:04:04:02 -0500] "GET > > > /production/file_metadatas/plugins?links=manage&recurse=true&ignore=---+%0A++-+%22.svn%22%0A++-+CVS%0A++-+%22.git%22&checksum_type=md5& > > > HTTP/1.1" 200 294 "-" "-" > > - - [25/Feb/2013:04:04:03 -0500] "POST > > /production/catalog/host11.mydomain.net HTTP/1.1" 400 180 "-" "-" > > - - [25/Feb/2013:04:04:03 -0500] "PUT > > /production/report/host11.mydomain.net HTTP/1.1" 200 16 "-" "-" > > > > However foreman public at http://ipaddr:80/ (not in a "production" sub > > folder).. > > That looks ok - the Puppet agent is querying the puppetmaster, which > will then call the /etc/puppet/node.rb script which then calls Foreman. > > > On client I receive > > > > > > Warning: Unable to fetch my node definition, but the agent run will > > continue: > > Warning: Error 400 on SERVER: Failed to find host11.mydomain.com via > > exec: Execution of '/etc/puppet/node.rb host11.mydomain.com' returned > 1: > > > > Info: Retrieving plugin > > Error: Could not retrieve catalog from remote server: Error 400 on > > SERVER: Failed when searching for node host11.mydomain.com: Failed to > > find host11.mydomain.com via exec: Execution of '/etc/puppet/node.rb > > host11.mydomain.com' returned 1: > > > > > > How do I change this, or is this normal setup and something else is not > > configured right? > > At the end of the quickstart, there's a step where you need to add a > Smart Proxy to Foreman - double check that you've done this: > > Log into Foreman, click on More, Configuration, Smart Proxies and add a > new proxy with the URL https://fqdn:8443/. This will enable Puppet class > imports from your new puppet master. > > Try the Puppet run again and see if it works. If not, check > /var/log/foreman/production.log and you should see a query for > externalNodes which might provide some more information. You can also > run the node.rb yourself, just make sure you do it as the Puppet user: > "sudo -u puppet /etc/puppet/node.rb host11.mydomain.com". > > -- > Dominic Cleal > Red Hat Engineering >

Please provide more detail on what the problem is, logs etc. The
original poster provided a log of Puppet failing (specifically an exit
code of 1 from node.rb) and the solution was given below in my reply.

··· -- Dominic Cleal Red Hat Engineering

On 03/04/13 04:23, dingtim@gmail.com wrote:

I found the same problem.

how slove?

在 2013年2月25日星期一UTC+8下午5时17分22秒,Dominic Cleal写道:

On 25/02/13 09:11, ateam...@gmail.com <javascript:> wrote:
> Hello
>
> I have installed puppet (puppetlabs repo) and foreman (using the
guide
> on the website).. When I call puppet agent -t from the client it
tries
> to fetch the URL on remote host.
>
>  - - [25/Feb/2013:04:04:02 -0500] "GET
> /production/node/host11.mydomain.net <http://host11.mydomain.net>?
HTTP/1.1" 400 123 "-" "-"
>  - - [25/Feb/2013:04:04:02 -0500] "GET
>
/production/file_metadatas/plugins?links=manage&recurse=true&ignore=---+%0A++-+%22.svn%22%0A++-+CVS%0A++-+%22.git%22&checksum_type=md5&

> HTTP/1.1" 200 294 "-" "-"
>  - - [25/Feb/2013:04:04:03 -0500] "POST
> /production/catalog/host11.mydomain.net
<http://host11.mydomain.net> HTTP/1.1" 400 180 "-" "-"
>  - - [25/Feb/2013:04:04:03 -0500] "PUT
> /production/report/host11.mydomain.net
<http://host11.mydomain.net> HTTP/1.1" 200 16 "-" "-"
>
> However foreman public at http://ipaddr:80/ (not in a "production"
sub
> folder)..

That looks ok - the Puppet agent is querying the puppetmaster, which
will then call the /etc/puppet/node.rb script which then calls Foreman.

> On client I receive
>
>
> Warning: Unable to fetch my node definition, but the agent run will
> continue:
> Warning: Error 400 on SERVER: Failed to find host11.mydomain.com
<http://host11.mydomain.com> via
> exec: Execution of '/etc/puppet/node.rb host11.mydomain.com
<http://host11.mydomain.com>' returned 1:
>
> Info: Retrieving plugin
> Error: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Failed when searching for node host11.mydomain.com
<http://host11.mydomain.com>: Failed to
> find host11.mydomain.com <http://host11.mydomain.com> via exec:
Execution of '/etc/puppet/node.rb
> host11.mydomain.com <http://host11.mydomain.com>' returned 1:
>
>
> How do I change this, or is this normal setup and something else
is not
> configured right?

At the end of the quickstart, there's a step where you need to add a
Smart Proxy to Foreman - double check that you've done this:

Log into Foreman, click on More, Configuration, Smart Proxies and add a
new proxy with the URL https://fqdn:8443/. This will enable Puppet
class
imports from your new puppet master.

Try the Puppet run again and see if it works.  If not, check
/var/log/foreman/production.log and you should see a query for
externalNodes which might provide some more information.  You can also
run the node.rb yourself, just make sure you do it as the Puppet user:
"sudo -u puppet /etc/puppet/node.rb host11.mydomain.com
<http://host11.mydomain.com>".

-- 
Dominic Cleal
Red Hat Engineering


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.