Project

General

Profile

Actions

Bug #1821

closed

Trying to get the provision template gives Error 500

Added by Markus Heberling almost 12 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I get Internal Server Error 500 if I try to provision a host. Getting the same provision template with spoofing works.

Started GET "/unattended/provision?spoof=78.46.234.237" for 93.195.68.189 at Mon Aug 13 19:22:41 +0200 2012
Processing by UnattendedController#provision as HTML
Parameters: {"spoof"=>"78.46.234.237"}
Found test.t-srv.de
Rendered inline template (22.3ms)
Completed 200 OK in 39ms (Views: 21.7ms | ActiveRecord: 24.9ms)

Started GET "/unattended/provision" for 78.46.234.237 at Mon Aug 13 19:23:02 +0200 2012
Processing by UnattendedController#provision as HTML
Found test.t-srv.de
Rendered text template (0.0ms)
Completed 500 Internal Server Error in 7ms (Views: 0.5ms | ActiveRecord: 1.8ms)

Actions #1

Updated by Markus Heberling almost 12 years ago

I enabled debug mode. here is the output:

Started GET "/unattended/provision" for 78.46.234.237 at Wed Aug 15 14:41:13 +0200 2012
Processing by UnattendedController#provision as HTML
Host Load (0.6ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."ip" = '78.46.234.237' LIMIT 1
Architecture Load (0.3ms) SELECT "architectures".* FROM "architectures" WHERE ("architectures"."id" = 2)
SQL (0.6ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"media"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Medium Load (0.4ms) SELECT "media".* FROM "media" WHERE ("media"."id" = 3)
Operatingsystem Load (0.3ms) SELECT "operatingsystems".* FROM "operatingsystems" WHERE ("operatingsystems"."id" = 2)
Domain Load (0.3ms) SELECT "domains".* FROM "domains" WHERE ("domains"."id" = 1)
Found mytest.t-srv.de
Setting Load (0.3ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'manage_puppetca' ORDER BY LOWER LIMIT 1
Rendered text template (0.0ms)
Completed 500 Internal Server Error in 26ms (Views: 12.0ms | ActiveRecord: 2.8ms)

Actions #2

Updated by Markus Heberling almost 12 years ago

And for comparison the debug log of the (working) spoof output

Started GET "/unattended/provision?spoof=78.46.234.237" for 93.195.73.187 at Wed Aug 15 14:50:09 +0200 2012
Processing by UnattendedController#provision as HTML
Parameters: {"spoof"=>"78.46.234.237"}
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Setting current user thread-local variable to admin
Host Load (0.5ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."ip" = '78.46.234.237' LIMIT 1
Architecture Load (0.3ms) SELECT "architectures".* FROM "architectures" WHERE ("architectures"."id" = 2)
Medium Load (0.3ms) SELECT "media".* FROM "media" WHERE ("media"."id" = 3)
Operatingsystem Load (0.3ms) SELECT "operatingsystems".* FROM "operatingsystems" WHERE ("operatingsystems"."id" = 2)
Domain Load (0.5ms) SELECT "domains".* FROM "domains" WHERE ("domains"."id" = 1)
Found mytest.t-srv.de
SQL (0.8ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"template_kinds"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
SQL (0.8ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"operatingsystems"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

SQL (0.7ms)   SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"environments"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
SQL (0.6ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"config_templates_operatingsystems"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
SQL (0.7ms)   SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"template_combinations"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
ConfigTemplate Load (1.6ms) SELECT "config_templates".* FROM "config_templates" INNER JOIN "config_templates_operatingsystems" ON "config_templates_operatingsystems"."config_template_id" = "config_templates"."id" INNER JOIN "operatingsystems" ON "operatingsystems"."id" = "config_templates_operatingsystems"."operatingsystem_id" INNER JOIN "template_kinds" ON "template_kinds"."id" = "config_templates"."template_kind_id" INNER JOIN "template_combinations" ON "config_templates"."id" = "template_combinations"."config_template_id" INNER JOIN "environments" ON "environments"."id" = "template_combinations"."environment_id" WHERE "template_kinds"."name" = 'provision' AND "operatingsystems"."id" = 2 AND "environments"."id" = 1 ORDER BY LOWER(config_templates.name) LIMIT 1
SQL (0.7ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"os_default_templates"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
SQL (0.6ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"config_templates_operatingsystems"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
ConfigTemplate Load (1.3ms)  SELECT "config_templates".* FROM "config_templates" INNER JOIN "config_templates_operatingsystems" ON "config_templates_operatingsystems"."config_template_id" = "config_templates"."id" INNER JOIN "operatingsystems" ON "operatingsystems"."id" = "config_templates_operatingsystems"."operatingsystem_id" INNER JOIN "template_kinds" ON "template_kinds"."id" = "config_templates"."template_kind_id" INNER JOIN "os_default_templates" ON "os_default_templates"."config_template_id" = "config_templates"."id" WHERE "template_kinds"."name" = 'provision' AND "operatingsystems"."id" = 2 AND "os_default_templates"."operatingsystem_id" = 2 ORDER BY LOWER(config_templates.name) LIMIT 1
rendering DB template Preseed Default - provision
Setting Load (0.4ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'safemode_render' ORDER BY LOWER(settings.name) LIMIT 1
Ptable Load (0.6ms) SELECT "ptables".* FROM "ptables" WHERE "ptables"."id" = 2 ORDER BY LOWER(ptables.name) LIMIT 1
CACHE (0.0ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'safemode_render' ORDER BY LOWER(settings.name) LIMIT 1
Setting Load (0.5ms) SELECT "settings".* FROM "settings" WHERE "settings"."name" = 'root_pass' ORDER BY LOWER(settings.name) LIMIT 1
Rendered inline template (39.0ms)
Completed 200 OK in 68ms (Views: 38.2ms | ActiveRecord: 12.3ms)
Actions #3

Updated by Markus Heberling almost 12 years ago

I had no puppetca defined. Its working now. Maybe some meaningful error message would be helpful. Otherwise this can be closed. :)

Actions #4

Updated by Ohad Levy almost 12 years ago

  • Status changed from New to Resolved

where you like to get the error shown? (which user etc).

Actions

Also available in: Atom PDF