Description of problem: The following exception occurred while executing this request: POST /network/systems/ssm/provisioning/remote_command_conf.pxt HTTP/1.1 (from browser) /network/systems/ssm/provisioning/remote_command_conf.pxt (from Apache) Date: Mon Nov 29 14:46:43 2010 Headers: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Encoding: gzip,deflate Accept-Language: en-us,en;q=0.5 Connection: keep-alive Content-Length: 243 Content-Type: application/x-www-form-urlencoded Cookie: pxt-session-cookie=4438xa5df2cfe34c510c76bb1929ad23ad0c6 Host: spacewalk.hgvc.com Keep-Alive: 115 Referer: https://spacewalk.hgvc.com/network/systems/ssm/provisioning/remote_command.pxt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 (CK-IBM) Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E) Form variables: am_pm => PM day => 29 formvar_hmac => f8e03c11acfd609e5f9ce92657640bca60f9400c group => root hour => 2 minute => 46 mode => ssm month => 11 schedule_remote_command => Schedule Remote Command script => #!/bin/sh /bin/true timeout => 600 username => root year => 2010 User Information: User rhelzer (id 1, org_id 1) Error notes: (none) Initial Request: Yes Error message: RHN::Exception: DBD::Oracle::db prepare_cached failed: ORA-00904: "OV"."SERVER_ID": invalid identifier (DBD ERROR: error possibly near <*> indicator at char 704 in ' SELECT SERVER_ID AS ID, SECURITY_ERRATA, BUG_ERRATA, ENHANCEMENT_ERRATA, OUTDATED_PACKAGES, SERVER_NAME, SERVER_ADMINS, GROUP_COUNT, NOTE_COUNT, MODIFIED, CHANNEL_LABELS, CHANNEL_ID, HISTORY_COUNT, LAST_CHECKIN_DAYS_AGO, PENDING_UPDATES, OS, RELEASE, SERVER_ARCH_NAME, LAST_CHECKIN, LOCKED, ( SELECT CASE MAX(CASE PS.state WHEN 'OK' THEN 1 WHEN 'PENDING' THEN 2 WHEN 'UNKNOWN' THEN 3 WHEN 'WARNING' THEN 4 WHEN 'CRITICAL' THEN 5 END) WHEN 1 THEN 'OK' WHEN 2 THEN 'PENDING' WHEN 3 THEN 'UNKNOWN' WHEN 4 THEN 'WARNING' WHEN 5 THEN 'CRITICAL' END ST FROM rhn_probe_state PS LEFT OUTER JOIN rhn_check_probe CP ON <*>OV.server_id = CP.host_id WHERE PS.probe_id = CP.probe_id GROUP BY OV.server_id ) MONITORING_STATUS, COALESCE((SELECT 1 FROM rhnServerFeaturesView SFV WHERE SFV.server_id = OV.server_id AND SFV.label = 'ftr_system_grouping'), 0) AS SELECTABLE FROM rhnServerOverview OV WHERE server_id IN (:p2, :p5, :p3, :p1, :p0, :p4, :p6) ORDER BY UPPER(NVL(SERVER_NAME, '(none)')), SERVER_ID ') [for Statement " SELECT SERVER_ID AS ID, SECURITY_ERRATA, BUG_ERRATA, ENHANCEMENT_ERRATA, OUTDATED_PACKAGES, SERVER_NAME, SERVER_ADMINS, GROUP_COUNT, NOTE_COUNT, MODIFIED, CHANNEL_LABELS, CHANNEL_ID, HISTORY_COUNT, LAST_CHECKIN_DAYS_AGO, PENDING_UPDATES, OS, RELEASE, SERVER_ARCH_NAME, LAST_CHECKIN, LOCKED, ( SELECT CASE MAX(CASE PS.state WHEN 'OK' THEN 1 WHEN 'PENDING' THEN 2 WHEN 'UNKNOWN' THEN 3 WHEN 'WARNING' THEN 4 WHEN 'CRITICAL' THEN 5 END) WHEN 1 THEN 'OK' WHEN 2 THEN 'PENDING' WHEN 3 THEN 'UNKNOWN' WHEN 4 THEN 'WARNING' WHEN 5 THEN 'CRITICAL' END ST FROM rhn_probe_state PS LEFT OUTER JOIN rhn_check_probe CP ON OV.server_id = CP.host_id WHERE PS.probe_id = CP.probe_id GROUP BY OV.server_id ) MONITORING_STATUS, COALESCE((SELECT 1 FROM rhnServerFeaturesView SFV WHERE SFV.server_id = OV.server_id AND SFV.label = 'ftr_system_grouping'), 0) AS SELECTABLE FROM rhnServerOverview OV WHERE server_id IN (:p2, :p5, :p3, :p1, :p0, :p4, :p6) ORDER BY UPPER(NVL(SERVER_NAME, '(none)')), SERVER_ID "] RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 228 RHN::Exception::DB::throw RHN::DB::DataSource /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/DataSource.pm 73 RHN::DB::handle_error RHN::DB::DataSource /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/DataSource.pm 52 RHN::DB::DataSource::run_query RHN::DataSource /usr/lib/perl5/vendor_perl/5.8.8/RHN/DataSource.pm 144 RHN::DB::DataSource::run_complex_query Sniglets::ListView::List /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/List.pm 1220 RHN::DataSource::elaborate Sniglets::ListView::List /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/List.pm 908 Sniglets::ListView::List::default_provider Sniglets::Lists /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/Lists.pm 119 Sniglets::ListView::List::render PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 160 Sniglets::Lists::listview PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 72 PXT::Parser::expand_tag PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 522 PXT::Parser::expand_tags PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 117 PXT::ApacheHandler::pxt_parse_data PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 117 (eval) main -e 0 PXT::ApacheHandler::handler main -e 0 (eval) Version-Release number of selected component (if applicable): 1.2 How reproducible: Every time. Steps to Reproduce: 1. Attempt to schedule a remote command voa https://spacewalk.hgvc.com/network/systems/ssm/provisioning/remote_command.pxt 2. Receive "500 Error - Internal Server Error" from https://spacewalk.hgvc.com/network/systems/ssm/provisioning/remote_command_conf.pxt Actual results: No remote command scheduled. Expected results: Remote command scheduled. Additional info:
Quick fix: Change line 1036 in System_queries.xml from: "FROM rhn_probe_state PS" To "FROM rhn_probe_state PS, rhnServerOverview OV" Fixes the problem for me.
Lukas, it is related to commits 163230506ca86de6efb7dd9e5220018c004d6357 7d337c4d88e4057d542601e2fb48099557e13e05 You may want to fix it.
Johan, I edited /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/DataSource/xml/System_queries.xml as you recommended, however I now get the following error when I confirm the scheduled commands: The following exception occurred while executing this request: POST /network/systems/ssm/provisioning/remote_command_conf.pxt HTTP/1.1 (from browser) /network/systems/ssm/provisioning/remote_command_conf.pxt (from Apache) Date: Tue Nov 30 13:39:08 2010 Headers: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Encoding: gzip,deflate Accept-Language: en-us,en;q=0.5 Connection: keep-alive Content-Length: 650 Content-Type: application/x-www-form-urlencoded Cookie: pxt-session-cookie=4443xa249cb265a2d09c16b12a12079db05f0 Host: spacewalk.hgvc.com Keep-Alive: 115 Referer: https://spacewalk.hgvc.com/network/systems/ssm/provisioning/remote_command_conf.pxt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 (CK-IBM) Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E) Form variables: alphabar_column => SERVER_NAME am_pm => PM day => 30 filter_value => first_lower => 1 first_upper => 50 formvars => hour formvars => hour formvars => hour formvars => hour formvars => hour formvars => hour formvars => hour formvars => hour formvars => hour formvars => hour formvars => hour group => root hour => 1 last_lower => 1 last_upper => 26 list_action_label_schedule_command => Schedule commands list_action_url_schedule_command => list_mode => ssm_remote_commandable lower => 1 minute => 38 month => 11 next_lower => 1 next_upper => 26 prev_filter_value => prev_lower => 1 prev_upper => 50 pxt:trap => rhn:system_list_cb script => #!/bin/sh /bin/true timeout => 600 upper => 26 username => root year => 2010 User Information: User rhelzer (id 1, org_id 1) Error notes: (none) Initial Request: Yes Error message: Died at /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm line 545.
Hi! That's another bug, I can't find the bug report right now but here's a patch for it " --- /driften/down/DB.pm 2010-11-29 14:35:47.000000000 +0100 +++ DB.pm 2010-11-29 14:36:06.000000000 +0100 @@ -542,7 +542,8 @@ if (ref $v and blessed($v) and $v->isa("RHN::DB::Type::BLOB")) { if ($self->{Database}->{Driver}->{Name} eq 'Oracle') { - eval 'use DBD::Oracle ()' or die $@; + eval 'use DBD::Oracle ()'; + if ($@) { die $@; } $attr->{ora_type} = DBD::Oracle::ORA_BLOB(); if (defined $v->{ora_field}) { $attr->{ora_field} = $v->{ora_field}; " Change line 545 in /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm and then it'll actually work. I hope. =) Good luck!
Johan, I can confirm, applying both the System_queries.xml change and the DB.pm patch and restarting Spacewalk finally allows one to schedule remote commands without 500 errors. Thank you for your assistance!
Fixed and cherry picked into Spacewalk 1.2. commit 5acd110b749d0f948b8aca26935f7d8c434ff200 Author: Lukas Zapletal <lzap+git> Date: Wed Dec 1 14:59:52 2010 +0100 658256 - Error 500 - ISE - when scheduling remote commands (cherry picked from commit 5db2eedb1f8247360da182983dbf012dfd09e57b)
Oh the commit is not fixing the issue properly. Reverted.
Fixed in master commit 3589dbc33ea667fc7e5d17ec5ee8e91eaeb0c8d4 Author: Lukas Zapletal <lzap+git> Date: Thu Dec 2 10:11:26 2010 +0100 658256 - Error 500 - ISE - when scheduling remote commands (proper fix) Proper fix for reverted commit 01595ed07a3db9bc51a14d74a0b031378c12d3b0 @Ron @Jonas: Your solution is not doing what you expect. The workaround is to rewrite whole query to the ANSI compatible syntax notation: http://git.fedorahosted.org/git/?p=spacewalk.git;a=blob;f=web/modules/rhn/RHN/DB/DataSource/xml/System_queries.xml;h=e261064bef88283b3e01ce5ef673e6c53be2959e;hb=3589dbc33ea667fc7e5d17ec5ee8e91eaeb0c8d4#l1027 See the line 1027.
Lukáš, I can confirm, replacing the "system_overview" query in System_queries.xml with the version you suggested works and appears to perform much better than the previously suggested fix. This also corrects #658250. - Ron -
Moving ON_QA ...
This bug has been fixed in Spacewalk 1.3.