Bug #2634
closedEventful reports - route error
Description
On 1.2-RC1 tag, trying to open eventful reports (just clicking on "reports"):
ActionController::RoutingError
No route matches {:host_id=>nil, :controller=>"reports"}
app/views/reports/_list.html.erb:18:in `_app_views_reports__list_html_erb___130845487__633955468'
app/views/reports/_list.html.erb:15:in `_app_views_reports__list_html_erb___130845487__633955468'
app/views/reports/index.html.erb:3:in `_app_views_reports_index_html_erb__916748500__633902068'
lib/foreman/thread_session.rb:31:in `clear_thread'
Updated by Joseph Magen over 11 years ago
- Status changed from New to Assigned
- Assignee set to Joseph Magen
Updated by Joseph Magen over 11 years ago
- Status changed from Assigned to Need more information
I can't duplicate this bug. Can yo provide more information how/when it happens?
Updated by Lex Rivera over 11 years ago
I updated 1.1 to 1.2.0-RC1 tag and after that i see that error.
Updated by Joseph Magen over 11 years ago
Lex, I still don't get the error when I checkout the 1.2.0-RC1 tag
Checkout the 1.2.0-RC2 tag and see if the error still exists.
The only thing that I can think of is that there is some invalid data in your database causing this. I'm kind of stumped.
Updated by Lex Rivera over 11 years ago
Seems like this was something in my database causing this. Cleaned it, updated to 1.2.0-RC2 and everything works now. Thanks.
Updated by Joseph Magen over 11 years ago
- Status changed from Need more information to Closed
Great. Thanks for the update. I'm closing this ticket.
Updated by David Blank-Edelman over 11 years ago
I'm sorry to ask for a re-opening of this issue, but I'm seeing the same thing with an upgrade from 1.1.1 to 1.2 via the Ubuntu packages on a Postgres backed install. Here's the error I'm seeing:
ActionController::RoutingError No route matches {:controller=>"reports", :host_id=>nil} app/views/reports/_list.html.erb:18:in `_app_views_reports__list_html_erb__1229755230_70302029736140' app/views/reports/_list.html.erb:15:in `_app_views_reports__list_html_erb__1229755230_70302029736140' app/views/reports/index.html.erb:3:in `_app_views_reports_index_html_erb__409991220_70302029747820' lib/foreman/thread_session.rb:31:in `clear_thread'
and in the logs:
Started GET "/reports?search=eventful+%3D+true" for XX.XXX.XX.XXX at Tue Jul 02 23:42:08 -0400 2013 Processing by ReportsController#index as HTML Parameters: {"search"=>"eventful = true"} Rendered reports/_list.html.erb (271.3ms) Rendered reports/index.html.erb within layouts/application (271.8ms) Operation FAILED: No route matches {:controller=>"reports", :host_id=>nil} Rendered common/500.html.erb within layouts/application (2.9ms) Completed 500 Internal Server Error in 284ms (Views: 5.2ms | ActiveRecord: 39.6ms)
I'm more than willing to believe it is something in the db (and I'm willing to provide a dump if that helps), but I'm afraid I don't know what Lex means by "Cleaned it" (would prefer not to drop all of the data if I can).
Any ideas on how to go about debugging this? Thanks!
Updated by Joseph Magen over 11 years ago
- Status changed from Closed to Assigned
I still can't reproduce the error. I thought it may be if there is an orphaned foreign key, where there is a report with host_id that doesn't exist.
Here is my log.
Started GET "/reports?search=eventful+%3D+true" for 127.0.0.1 at 2013-07-03 09:54:27 +0300 Processing by ReportsController#index as HTML Parameters: {"search"=>"eventful = true"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]] Setting current user thread-local variable to admin (0.3ms) SELECT COUNT(*) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') Setting current organization thread-local variable to none (0.2ms) SELECT COUNT(*) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') Location Load (0.2ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') AND "taxonomies"."id" = $1 ORDER BY type, name LIMIT 1 [["id", 3]] Setting current location thread-local variable to TLV (0.2ms) SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') LIMIT 1 (0.1ms) SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') LIMIT 1 Report Load (0.2ms) SELECT "reports".* FROM "reports" LIMIT 1 (0.3ms) SELECT "hosts"."id" FROM "hosts" WHERE "hosts"."location_id" IN (3) AND "hosts"."type" IN ('Host::Managed') Report Load (10.5ms) SELECT "reports".* FROM "reports" WHERE "reports"."host_id" IN (179, 183, 194, 197, 199, 541, 661, 846, 847, 853, 858, 860, 866, 873, 878, 879, 880, 906, 914, 916, 917, 918, 871, 857, 182, 920, 921, 444, 394) AND (((("reports"."status" >> 0 & 16777215) > 0))) ORDER BY "reports"."reported_at" DESC NULLS LAST LIMIT 20 OFFSET 0 Host::Managed Load (0.4ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."location_id" IN (3) AND "hosts"."type" IN ('Host::Managed') AND "hosts"."id" IN (194, 197, 394) (9.2ms) SELECT COUNT(*) FROM "reports" WHERE "reports"."host_id" IN (179, 183, 194, 197, 199, 541, 661, 846, 847, 853, 858, 860, 866, 873, 878, 879, 880, 906, 914, 916, 917, 918, 871, 857, 182, 920, 921, 444, 394) AND (((("reports"."status" >> 0 & 16777215) > 0))) Rendered reports/_list.html.erb (54.2ms) Rendered reports/index.html.erb within layouts/application (54.7ms) Rendered home/_user_dropdown.html.erb (1.0ms) CACHE (0.0ms) SELECT COUNT(*) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') Organization Load (0.7ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') ORDER BY type, name Rendered home/_organization_dropdown.html.erb (3.3ms) CACHE (0.0ms) SELECT COUNT(*) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') Location Load (0.3ms) SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') ORDER BY type, name
Did you cut out some lines in your log?
Updated by Joseph Magen over 11 years ago
- Target version changed from 1.2.0 to 1.2.1
Updated by David Blank-Edelman over 11 years ago
Thanks for looking into this. The log lines are exactly as I pasted them.
I see no SQL statements reported in them, though it is entirely possible my logging is not sufficiently cranked up. If you tell me what SQL to run to check for the foreign key condition and/or what to set to bring it to the same debugging level, I'm happy to do both and provide the info.
Updated by Dominic Cleal over 11 years ago
David, check this page for info on enabling full debug logs:
http://projects.theforeman.org/wiki/foreman/Troubleshooting#How-do-I-enable-debugging
It should then log SQL queries too.
Updated by David Blank-Edelman over 11 years ago
Thanks for the debug pointer.
(slept for some hours)...made the config change...bounced nginx...and....
no sign of the bug. Change back to info level, restart nginx, and still no sign.
I couldn't tell you what made this heisenbug go away. My first guess is overnight the right host checked in and inserted data that made the condition go away.
At least now I know how to throw things into debugging mode should I see this return. I guess we can go back to leaving this bug closed, sigh. Thanks again!
Updated by Dominic Cleal over 11 years ago
- Category set to Reporting
- Status changed from Assigned to Closed
- Target version deleted (
1.2.1)
Thanks for confirming David. If it happens again, let us know!
Updated by Joseph Magen over 11 years ago
David, I created an orphaned foreign key and there was no error, so it must be something else.
Updated by Peter Gustafsson over 11 years ago
Hi,
I'm having the same issue using foreman 1.2 stable and postgreSQL.
Here is my log:
Started GET "/" for 10.77.12.65 at 2013-07-05 10:13:54 +0200 Processing by DashboardController#index as HTML User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]] Setting current user thread-local variable to admin (0.7ms) SELECT COUNT(*) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') Setting current organization thread-local variable to none (0.6ms) SELECT COUNT(*) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') Setting current location thread-local variable to none (0.6ms) SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') LIMIT 1 (0.6ms) SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') LIMIT 1 Host::Managed Load (1.1ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') LIMIT 1 (0.7ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') (0.8ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report > '2013-07-05 07:38:54.883906') AND ((puppet_status > 0) and ( ((puppet_status >> 12 & 63) != 0) or ((puppet_status >> 18 & 63) != 0) )) (0.8ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report > '2013-07-05 07:38:54.887775') AND ((puppet_status > 0) and ( ((puppet_status >> 12 & 63) != 0) or ((puppet_status >> 18 & 63) != 0) )) AND (enabled = 't') (0.8ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report > '2013-07-05 07:38:54.891636') AND ((puppet_status > 0) and ( ((puppet_status >> 0 & 63) != 0) or ((puppet_status >> 6 & 63) != 0) )) (0.9ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report > '2013-07-05 07:38:54.895193') AND ((puppet_status > 0) and ( ((puppet_status >> 0 & 63) != 0) or ((puppet_status >> 6 & 63) != 0) )) AND (((puppet_status >> 12 & 63) = 0) and ((puppet_status >> 18 & 63) = 0)) (0.9ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report > '2013-07-05 07:38:54.898864') AND ((puppet_status > 0) and ( ((puppet_status >> 0 & 63) != 0) or ((puppet_status >> 6 & 63) != 0) )) AND (((puppet_status >> 12 & 63) = 0) and ((puppet_status >> 18 & 63) = 0)) AND (enabled = 't') (4.8ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report > '2013-07-05 07:38:54.902927') AND (((puppet_status >> 0 & 63) = 0) and ((puppet_status >> 6 & 63) = 0)) AND (((puppet_status >> 12 & 63) = 0) and ((puppet_status >> 18 & 63) = 0)) AND (((puppet_status >> 30 & 63) = 0)) (1.1ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report > '2013-07-05 07:38:54.911715') AND (((puppet_status >> 0 & 63) = 0) and ((puppet_status >> 6 & 63) = 0)) AND (((puppet_status >> 12 & 63) = 0) and ((puppet_status >> 18 & 63) = 0)) AND (((puppet_status >> 30 & 63) = 0)) AND (enabled = 't') (0.8ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report < '2013-07-05 07:38:54.916890' and enabled != 'f') (0.8ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report < '2013-07-05 07:38:54.919950' and enabled != 'f') AND (enabled = 't') (0.9ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (enabled = 'f') (0.8ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report > '2013-07-05 07:38:54.925919') AND ((puppet_status > 0) and ((puppet_status >> 30 & 63) != 0)) (0.8ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (last_report > '2013-07-05 07:38:54.929606') AND ((puppet_status > 0) and ((puppet_status >> 30 & 63) != 0)) AND (enabled = 't') (0.7ms) SELECT COUNT(*) FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND (((NOT COALESCE("hosts"."last_report" IS NOT NULL, false)) AND (("hosts"."enabled" <> 'f')))) Rendered dashboard/_status_table.html.erb (6.6ms) (0.8ms) SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "reports" WHERE (status != 0) AND (("reports"."reported_at" >= '2013-06-29')) LIMIT 6) subquery_for_count Report Load (1.1ms) SELECT "reports".* FROM "reports" WHERE (status != 0) AND (("reports"."reported_at" >= '2013-06-29')) ORDER BY "reports"."reported_at" DESC NULLS LAST LIMIT 6 Host::Managed Load (0.9ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."id" = 18 LIMIT 1 Host::Managed Load (1.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."id" = 14 LIMIT 1 CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."id" = 18 LIMIT 1 CACHE (0.0ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."id" = 18 LIMIT 1 Host::Managed Load (0.9ms) SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."id" = 33 LIMIT 1 Rendered dashboard/index.html.erb within layouts/application (37.5ms) Operation FAILED: No route matches {:controller=>"reports", :host_id=>nil} /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:532:in `raise_routing_error' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:528:in `rescue in generate' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:520:in `generate' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:561:in `generate' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:586:in `url_for' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/url_for.rb:148:in `url_for' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/url_helper.rb:107:in `url_for' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:213:in `host_reports_path' /usr/share/foreman/app/views/dashboard/index.html.erb:27:in `block in _app_views_dashboard_index_html_erb___2341707709798967778_55020820' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /usr/share/foreman/app/views/dashboard/index.html.erb:25:in `_app_views_dashboard_index_html_erb___2341707709798967778_55020820' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:45:in `render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:18:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:36:in `render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:17:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:110:in `_render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/streaming.rb:225:in `_render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:103:in `render_to_body' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/renderers.rb:28:in `render_to_body' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/compatibility.rb:50:in `render_to_body' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:88:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:16:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/benchmark.rb:5:in `block in ms' /opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:295:in `realtime' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/benchmark.rb:5:in `ms' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:40:in `block in render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:39:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:10:in `default_render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/mime_responds.rb:196:in `respond_to' /usr/share/foreman/app/controllers/dashboard_controller.rb:6:in `index' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:549:in `block (3 levels) in _run__1252528313113801285__process_action__118373899845998496__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_4539' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_917' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_4539' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:537:in `block (2 levels) in _run__1252528313113801285__process_action__118373899845998496__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_4538' /usr/share/foreman/lib/foreman/thread_session.rb:31:in `clear_thread' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_4538' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:415:in `block in _run__1252528313113801285__process_action__118373899845998496__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_4537' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_13' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_4537' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run__1252528313113801285__process_action__118373899845998496__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in `block in action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.0.18/lib/apipie/static_dispatcher.rb:56:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `_run__3117997350554980598__call__4525438644838438571__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in `call_app' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads' Rendered common/500.html.erb within layouts/application (6.0ms) Completed 500 Internal Server Error in 126ms (Views: 10.6ms | ActiveRecord: 4.8ms)
Updated by Dominic Cleal over 11 years ago
- Status changed from Closed to Assigned
Updated by Dominic Cleal over 11 years ago
I've looked at Peter's database and there are reports referencing a host_id that's non-existent, after the hosts were deleted via the web UI. It appears the reports aren't getting deleted for some reason when the host is destroyed. I can't replicate this behaviour at the moment, only the resulting error.
Updated by Dominic Cleal over 11 years ago
It looks like the host delete initially failed as the VM was powered on (maybe #2704), and then was deleted a second time. There aren't debug logs for this period though so I'm not sure what happened to the DB.
This SQL query should work to delete orphaned reports and get rid of the error:
delete from reports where host_id not in (select id from hosts);
(for PostgreSQL, run sudo -u foreman psql
to get a shell)
Updated by Joseph Magen over 11 years ago
- Description updated (diff)
- Status changed from Assigned to Feedback
- Assignee deleted (
Joseph Magen)
Updated by Benjamin Papillon almost 11 years ago
Hello,
Can you provide feedback regarding this issue?
It has been open for a while now and we are not aware if it solved the issue for you.
Regards,
Updated by Anonymous over 7 years ago
- Status changed from Feedback to Resolved
no reaction, closing.