Node.rb returning 404 error

Hi,

Followed the guide down below for porting foreman to postgress in line with
the upstream but now the node.rb fails with :-

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Failed when searching for node.

Guide Followed :-

https://fedoraproject.org/wiki/How_to_Puppet_Foreman_Mysql_or_Postgresql_on_RHEL6

Hi,

Sharing a database with Puppet was deprecated in 1.1 and is unsupported in
the upcoming 1.2 release. If you want to migrate from one type of database
to another, I'd recommend using the provided Rake task. The documentation
for this is at:
Foreman :: Manual, under
Switching Databases.

Regards,
Greg

··· On 13 June 2013 16:25, Richie Rees wrote:

Hi,

Followed the guide down below for porting foreman to postgress in line
with the upstream but now the node.rb fails with :-

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Failed when searching for node.

Guide Followed :-

https://fedoraproject.org/wiki/How_to_Puppet_Foreman_Mysql_or_Postgresql_on_RHEL6

You're not the first to run across this guide and run afoul. I'm not
sure of its history, but I've now edited the wiki and added a big
warning to the top.

With Foreman 1.2 our installer is now capable of configuring PostgreSQL
and will do so by default (using the Puppet Labs module), which
hopefully makes all of the manual porting configuration out of date.

··· On 13/06/13 17:39, Greg Sutcliffe wrote: > > On 13 June 2013 16:25, Richie Rees > wrote: > > Hi, > > Followed the guide down below for porting foreman to postgress in > line with the upstream but now the node.rb fails with :- > > Error: Could not retrieve catalog from remote server: Error 400 on > SERVER: Failed when searching for node. > > Guide Followed :- > > https://fedoraproject.org/wiki/How_to_Puppet_Foreman_Mysql_or_Postgresql_on_RHEL6 > > > Hi, > > Sharing a database with Puppet was deprecated in 1.1 and is unsupported > in the upcoming 1.2 release. If you want to migrate from one type of > database to another, I'd recommend using the provided Rake task. The > documentation for this is at: > http://theforeman.org/manuals/1.1/index.html#3.5.3DatabaseSetup, under > Switching Databases.


Dominic Cleal
Red Hat Engineering

Thanks Dominic Good planning on the warning.

I have rolled back the changes but now the call from node.rb never gets to
the web service when the fqdn is in the host file pointed at the loopback,
when I change it to the external address, the call arrives but gets
redirected to the login page.

··· On Thursday, 13 June 2013 18:06:47 UTC+1, Dominic Cleal wrote: > > On 13/06/13 17:39, Greg Sutcliffe wrote: > > > > On 13 June 2013 16:25, Richie Rees <richard...@gmail.com > > <mailto:richard...@gmail.com >> wrote: > > > > Hi, > > > > Followed the guide down below for porting foreman to postgress in > > line with the upstream but now the node.rb fails with :- > > > > Error: Could not retrieve catalog from remote server: Error 400 on > > SERVER: Failed when searching for node. > > > > Guide Followed :- > > > > > https://fedoraproject.org/wiki/How_to_Puppet_Foreman_Mysql_or_Postgresql_on_RHEL6 > > > > > > Hi, > > > > Sharing a database with Puppet was deprecated in 1.1 and is unsupported > > in the upcoming 1.2 release. If you want to migrate from one type of > > database to another, I'd recommend using the provided Rake task. The > > documentation for this is at: > > http://theforeman.org/manuals/1.1/index.html#3.5.3DatabaseSetup, under > > Switching Databases. > > You're not the first to run across this guide and run afoul. I'm not > sure of its history, but I've now edited the wiki and added a big > warning to the top. > > With Foreman 1.2 our installer is now capable of configuring PostgreSQL > and will do so by default (using the Puppet Labs module), which > hopefully makes all of the manual porting configuration out of date. > > -- > Dominic Cleal > Red Hat Engineering >

Fixed by adding a new virtual host definition in the foreman.conf apache
file which works not sure why it has stopped working though…

··· On Thursday, 13 June 2013 18:40:11 UTC+1, Richie Rees wrote: > > Thanks Dominic Good planning on the warning. > > I have rolled back the changes but now the call from node.rb never gets to > the web service when the fqdn is in the host file pointed at the loopback, > when I change it to the external address, the call arrives but gets > redirected to the login page. > > On Thursday, 13 June 2013 18:06:47 UTC+1, Dominic Cleal wrote: >> >> On 13/06/13 17:39, Greg Sutcliffe wrote: >> > >> > On 13 June 2013 16:25, Richie Rees > > > wrote: >> > >> > Hi, >> > >> > Followed the guide down below for porting foreman to postgress in >> > line with the upstream but now the node.rb fails with :- >> > >> > Error: Could not retrieve catalog from remote server: Error 400 on >> > SERVER: Failed when searching for node. >> > >> > Guide Followed :- >> > >> > >> https://fedoraproject.org/wiki/How_to_Puppet_Foreman_Mysql_or_Postgresql_on_RHEL6 >> > >> > >> > Hi, >> > >> > Sharing a database with Puppet was deprecated in 1.1 and is unsupported >> > in the upcoming 1.2 release. If you want to migrate from one type of >> > database to another, I'd recommend using the provided Rake task. The >> > documentation for this is at: >> > http://theforeman.org/manuals/1.1/index.html#3.5.3DatabaseSetup, under >> > Switching Databases. >> >> You're not the first to run across this guide and run afoul. I'm not >> sure of its history, but I've now edited the wiki and added a big >> warning to the top. >> >> With Foreman 1.2 our installer is now capable of configuring PostgreSQL >> and will do so by default (using the Puppet Labs module), which >> hopefully makes all of the manual porting configuration out of date. >> >> -- >> Dominic Cleal >> Red Hat Engineering >> >

Ok this is odd it seems to be returning the correct information and
ignoring it…

err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Failed when searching for node node.test: Failed to find node.test via
exec: Execution of '/etc/puppet/node.rb node.test' returned 1: —
parameters:
root_pw: "********"
puppetmaster: foreman
domainname: "Our Test Domain"
owner_email: "my email"
foreman_env: development
owner_name: "Richie Rees"
hostgroup: Test
puppet_ca: foreman
classes: {}
environment: development

warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

This is often if you've run node.rb as root, it creates root-owned files
under /var/lib/puppet/yaml that the puppetmaster (which runs as
'puppet') can't handle.

Try chown -R puppet:puppet /var/lib/puppet/yaml/foreman.

··· On 13/06/13 19:39, Richie Rees wrote: > Ok this is odd it seems to be returning the correct information and > ignoring it..... > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Failed when searching for node node.test: Failed to find node.test via > exec: Execution of '/etc/puppet/node.rb node.test' returned 1: --- > parameters: > root_pw: "********" > puppetmaster: foreman > domainname: "Our Test Domain" > owner_email: "my email" > foreman_env: development > owner_name: "Richie Rees" > hostgroup: Test > puppet_ca: foreman > classes: {} > environment: development > > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run


Dominic Cleal
Red Hat Engineering