Unattended installation - internal server 500 error

Just moved over from Spacewalk + cobbler to TheForeman. Setup my PXE
environment. Created a host and set the provisioning templates. I can view
the template and everything looks good. The pxelinux.cfg file gets created.
However, as a test I tried to pull down the kickstart file to ensure it was
correct (using tokens so I could do it from any computer). However when I
try to grab it with wget it just returns a 500 error:

wget
http://192.168.102.23/unattended/provision?token=8408bf5b-7e76-4e5f-b8be-0e97e8c4009e

And the production.log file on the foreman main server:

Started GET
"/unattended/provision?token=8408bf5b-7e76-4e5f-b8be-0e97e8c4009e" for
192.168.102.33 at Mon Jun 17 11:59:09 -0700 2013
Processing by UnattendedController#provision as
Parameters: {"token"=>"8408bf5b-7e76-4e5f-b8be-0e97e8c4009e"}
Host Load (1.1ms) SELECT hosts.* FROM "hosts" INNER JOIN "tokens" ON
"tokens"."host_id" = "hosts"."id" AND expires >= '2013-06-17 18:59:09'
WHERE "tokens"."value" = '8408bf5b-7e76-4e5f-b8be-0e97e8c4009e' LIMIT 1
Operatingsystem Load (0.3ms) SELECT "operatingsystems".* FROM
"operatingsystems" WHERE "operatingsystems"."id" = 1 ORDER BY
LOWER(operatingsystems.name) LIMIT 1
Found mai01-test-01v.local
Rendered text template (0.0ms)
Completed 500 Internal Server Error in 14ms (Views: 1.4ms | ActiveRecord:
1.4ms)

I increased the logging to debug on the main foreman + proxy. As well as
all the smart proxy servers (currently just a TFTP + DHCP and Puppet), but
I don't see anything getting logged in there except one message for when
proxy started up. Kind of stuck as to where to go from here.

Thanks

You say Puppet - does your proxy also have the PuppetCA feature enabled? If
Yes, then you should definitely be seeing more logs, which might be a good
place to start investigating. If No, then ensure you have set manage_ca
Setting to false, as otherwise Foreman will attempt to call for a PuppetCA
proxy that doesn't exist.

HTH,
Greg

··· On 17 June 2013 20:31, Matthew Ceroni wrote:

I increased the logging to debug on the main foreman + proxy. As well as
all the smart proxy servers (currently just a TFTP + DHCP and Puppet), but
I don’t see anything getting logged in there except one message for when
proxy started up. Kind of stuck as to where to go from here.

Hi There - I am seeing this exact error - did you ever get to the bottom of
it?

Thanks

JA

··· On Monday, June 17, 2013 3:31:43 PM UTC-4, Matthew Ceroni wrote: > > Just moved over from Spacewalk + cobbler to TheForeman. Setup my PXE > environment. Created a host and set the provisioning templates. I can view > the template and everything looks good. The pxelinux.cfg file gets created. > However, as a test I tried to pull down the kickstart file to ensure it was > correct (using tokens so I could do it from any computer). However when I > try to grab it with wget it just returns a 500 error: > > wget > http://192.168.102.23/unattended/provision?token=8408bf5b-7e76-4e5f-b8be-0e97e8c4009e > > And the production.log file on the foreman main server: > > Started GET > "/unattended/provision?token=8408bf5b-7e76-4e5f-b8be-0e97e8c4009e" for > 192.168.102.33 at Mon Jun 17 11:59:09 -0700 2013 > Processing by UnattendedController#provision as > Parameters: {"token"=>"8408bf5b-7e76-4e5f-b8be-0e97e8c4009e"} > Host Load (1.1ms) SELECT hosts.* FROM "hosts" INNER JOIN "tokens" ON > "tokens"."host_id" = "hosts"."id" AND expires >= '2013-06-17 18:59:09' > WHERE "tokens"."value" = '8408bf5b-7e76-4e5f-b8be-0e97e8c4009e' LIMIT 1 > Operatingsystem Load (0.3ms) SELECT "operatingsystems".* FROM > "operatingsystems" WHERE "operatingsystems"."id" = 1 ORDER BY LOWER( > operatingsystems.name) LIMIT 1 > Found mai01-test-01v.local > Rendered text template (0.0ms) > Completed 500 Internal Server Error in 14ms (Views: 1.4ms | ActiveRecord: > 1.4ms) > > I increased the logging to debug on the main foreman + proxy. As well as > all the smart proxy servers (currently just a TFTP + DHCP and Puppet), but > I don't see anything getting logged in there except one message for when > proxy started up. Kind of stuck as to where to go from here. > > Thanks >

Jeff,

If you try to get a template that is broken (because of a syntax error,
empty objects/methods you try to use in it etc.) this is the error that'll
get thrown in your face. Check your template carefully for errors.

Greetz

Ronald

··· On Thursday, 16 October 2014 20:11:01 UTC+2, Jeff Applewhite wrote: > > Hi There - I am seeing this exact error - did you ever get to the bottom > of it? > > Thanks > > JA > > On Monday, June 17, 2013 3:31:43 PM UTC-4, Matthew Ceroni wrote: >> >> Just moved over from Spacewalk + cobbler to TheForeman. Setup my PXE >> environment. Created a host and set the provisioning templates. I can view >> the template and everything looks good. The pxelinux.cfg file gets created. >> However, as a test I tried to pull down the kickstart file to ensure it was >> correct (using tokens so I could do it from any computer). However when I >> try to grab it with wget it just returns a 500 error: >> >> wget >> http://192.168.102.23/unattended/provision?token=8408bf5b-7e76-4e5f-b8be-0e97e8c4009e >> >> And the production.log file on the foreman main server: >> >> Started GET >> "/unattended/provision?token=8408bf5b-7e76-4e5f-b8be-0e97e8c4009e" for >> 192.168.102.33 at Mon Jun 17 11:59:09 -0700 2013 >> Processing by UnattendedController#provision as >> Parameters: {"token"=>"8408bf5b-7e76-4e5f-b8be-0e97e8c4009e"} >> Host Load (1.1ms) SELECT hosts.* FROM "hosts" INNER JOIN "tokens" ON >> "tokens"."host_id" = "hosts"."id" AND expires >= '2013-06-17 18:59:09' >> WHERE "tokens"."value" = '8408bf5b-7e76-4e5f-b8be-0e97e8c4009e' LIMIT 1 >> Operatingsystem Load (0.3ms) SELECT "operatingsystems".* FROM >> "operatingsystems" WHERE "operatingsystems"."id" = 1 ORDER BY LOWER( >> operatingsystems.name) LIMIT 1 >> Found mai01-test-01v.local >> Rendered text template (0.0ms) >> Completed 500 Internal Server Error in 14ms (Views: 1.4ms | ActiveRecord: >> 1.4ms) >> >> I increased the logging to debug on the main foreman + proxy. As well as >> all the smart proxy servers (currently just a TFTP + DHCP and Puppet), but >> I don't see anything getting logged in there except one message for when >> proxy started up. Kind of stuck as to where to go from here. >> >> Thanks >> >