Bug 519117

Summary: Internal Server Error (500) with rhncfg-manager when adding new files
Product: [Community] Spacewalk Reporter: support
Component: ClientsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 0.6CC: cperry, support
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-16 12:56:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 543511    

Description support 2009-08-25 08:58:36 UTC
Description of problem:

Could not upload new files to configuration channel with CLI "rhncfg-manager".
Error Message: XML-RPC call error: <ProtocolError for <server> /CONFIG-MANAGEMENT-TOOL: 500 Internal Server Error> 

With the server version 0.3 the problem does not occur. 

Version-Release number of selected component (if applicable):
Server Version: 0.6 

Client Linux:
Name        : rhncfg-management            Relocations: (not relocatable)
Version     : 5.9.7                             Vendor: Koji
Release     : 1.el5                         Build Date: Wed 05 Aug 2009 11:39:52 PM CEST

Client Sparc: 
rhncfg-actions 5.1.0 

How reproducible:

execute
rhncfg-manager add -c test /var/tmp/bla 
Pushing to channel test:
XML-RPC call error: <ProtocolError for <server> /CONFIG-MANAGEMENT-TOOL: 500 Internal Server Error>

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 support 2009-08-28 11:39:51 UTC
(In reply to comment #0)
> Description of problem:
> 
> Could not upload new files to configuration channel with CLI "rhncfg-manager".
> Error Message: XML-RPC call error: <ProtocolError for <server>
> /CONFIG-MANAGEMENT-TOOL: 500 Internal Server Error> 
> 
> With the server version 0.3 and 0.5 the problem does not occur. This Problem could not be fixed with an upgrade installation from 0.5 to 0.6! 
> 
> Version-Release number of selected component (if applicable):
> Server Version: 0.6 
> 
> Client Linux:
> Name        : rhncfg-management            Relocations: (not relocatable)
> Version     : 5.9.7                             Vendor: Koji
> Release     : 1.el5                         Build Date: Wed 05 Aug 2009
> 11:39:52 PM CEST
> 
> Client Sparc: 
> rhncfg-actions 5.1.0 
> 
> How reproducible:
> 
> execute
> rhncfg-manager add -c test /var/tmp/bla 
> Pushing to channel test:
> XML-RPC call error: <ProtocolError for <server> /CONFIG-MANAGEMENT-TOOL: 500
> Internal Server Error>
> 
> Steps to Reproduce:
> 1.
> 2.
> 3.
> 
> Actual results:
> 
> 
> Expected results:
> 
> 
> Additional info:

Comment 2 support 2009-08-28 11:50:41 UTC
With the server version 0.3 and 0.5 the problem does not occur. This Problem could not be fixed with an upgrade installation from 0.5 to 0.6!

Comment 3 Milan Zázrivec 2009-09-01 14:32:31 UTC
# rpm -q rhncfg-management
rhncfg-management-5.9.9-1.el5
# rhncfg-manager add -c configuration-channel-01 /var/tmp/test
Red Hat Network username: admin
Password: 
Pushing to channel configuration-channel-01:
Local file /var/tmp/test -> remote file /var/tmp/test

On the server:
# tail -f /var/log/httpd/*_log
hostname - - [01/Sep/2009:16:30:36 +0200] "POST /XMLRPC HTTP/1.1" 200 770 "-" "rhn.rpclib.py/$Revision$"
hostname - - [01/Sep/2009:16:30:36 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 118 "-" "rhn.rpclib.py/$Revision$"
hostname - - [01/Sep/2009:16:30:36 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 175 "-" "rhn.rpclib.py/$Revision$"
hostname - - [01/Sep/2009:16:30:36 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 195 "-" "rhn.rpclib.py/$Revision$"
hostname - - [01/Sep/2009:16:30:36 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 126 "-" "rhn.rpclib.py/$Revision$"
hostname - - [01/Sep/2009:16:30:36 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 118 "-" "rhn.rpclib.py/$Revision$

Are you able to provide more detailed description of the problem, for
example httpd logs from the Spacewalk server when the problem occurs?

Comment 4 support 2009-09-02 06:57:57 UTC
==> /var/log/httpd/ssl_access_log <==
<client> - - [02/Sep/2009:08:45:47 +0200] "POST /XMLRPC HTTP/1.1" 200 770
<client> - - [02/Sep/2009:08:45:48 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 118
<client> - - [02/Sep/2009:08:45:48 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 150

==> /var/log/httpd/ssl_request_log <==
[02/Sep/2009:08:45:47 +0200] <client> TLSv1 DHE-RSA-AES256-SHA "POST /XMLRPC HTTP/1.1" 770
[02/Sep/2009:08:45:48 +0200] <client> TLSv1 DHE-RSA-AES256-SHA "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 118
[02/Sep/2009:08:45:48 +0200] <client> TLSv1 DHE-RSA-AES256-SHA "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 150

==> /var/log/httpd/ssl_access_log <==
<client> - - [02/Sep/2009:08:45:51 +0200] "POST /XMLRPC HTTP/1.1" 200 770
<client> - - [02/Sep/2009:08:45:52 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 118
<client> - - [02/Sep/2009:08:45:52 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 150

==> /var/log/httpd/ssl_request_log <==
[02/Sep/2009:08:45:51 +0200] <client> TLSv1 DHE-RSA-AES256-SHA "POST /XMLRPC HTTP/1.1" 770
[02/Sep/2009:08:45:52 +0200] <client> TLSv1 DHE-RSA-AES256-SHA "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 118
[02/Sep/2009:08:45:52 +0200] <client> TLSv1 DHE-RSA-AES256-SHA "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 150

==> /var/log/httpd/ssl_access_log <==
<client> - - [02/Sep/2009:08:45:52 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 195
<client> - - [02/Sep/2009:08:45:52 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 200 126
<client> - - [02/Sep/2009:08:45:52 +0200] "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 500 9

==> /var/log/httpd/ssl_request_log <==
[02/Sep/2009:08:45:52 +0200] <client> TLSv1 DHE-RSA-AES256-SHA "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 195
[02/Sep/2009:08:45:52 +0200] <client> TLSv1 DHE-RSA-AES256-SHA "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 126
[02/Sep/2009:08:45:52 +0200] <client> TLSv1 DHE-RSA-AES256-SHA "POST /CONFIG-MANAGEMENT-TOOL HTTP/1.1" 9

XMLRPC LOG: 
2009/09/02 08:53:44 +02:00 18494 192.168.42.88: rhnSQL/driver_cx_Oracle.connect('Connecting to database', 'XE')
2009/09/02 08:53:44 +02:00 18494 192.168.42.88: xmlrpc/registration.welcome_message('lang: None',)

Client request: 
[root@rhnupdate ~]# rhncfg-manager add -c test /var/tmp/bla 
Pushing to channel test:
XML-RPC call error: <ProtocolError for <server> /CONFIG-MANAGEMENT-TOOL: 500 Internal Server Error>

Debug level is currently 1, did you need furthermore informations?

Comment 5 support 2009-09-02 10:39:26 UTC
httpd error log: #

RHN 18497 2009/09/02 08:59:47 +02:00: ('Server not subscribed to any channels', 1000010021)
Exception reported from mtagrhn1.matrix.int
Time: Wed Sep  2 08:53:46 2009
Exception type server.rhnSQL.sql_base.SQLError
Exception while handling function config.management.put_file
Request object information:
URI: /CONFIG-MANAGEMENT-TOOL
Remote Host: rhnupdate.matrix.int
Server Name: mtagrhn1.matrix.int:443
Headers passed in:
        Accept-Encoding: identity
        Content-Length: 374
        Host: mtagrhn1.matrix.int:443
        content-encoding: x-gzip
        content-transfer-encoding: binary
        content-type: application/binary
        user-agent: rhn.rpclib.py/$Revision$
        x-client-version: 1
        x-info: RPC Processor (C) Red Hat, Inc (version $Revision$)
        x-rhn-client-capability: rhncfg.dirs_enabled(1)=1,configfiles.base64_enc(1)=1
        x-rhn-transport-capability: follow-redirects=3
        x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version $Revision$)
Extra information about this error:
SQL Error generated: (6553, "ORA-06553: PLS-306: wrong number or types of arguments in call to 'LOOKUP_CONFIG_INFO'\n", 'select lookup_config_info(:username, :groupname, :file_mode) id from dual')

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/apacheRequest.py", line 120, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/config_mgmt/rhn_config_management.py", line 415, in management_put_file
    result = self.push_file(conf_channel_id, dict)
  File "/usr/share/rhn/server/configFilesHandler.py", line 192, in push_file
    result = self._push_file(config_channel_id, file)
  File "/usr/share/rhn/server/configFilesHandler.py", line 176, in _push_file
    self._push_config_file(file)
  File "/usr/share/rhn/server/configFilesHandler.py", line 338, in _push_config_file
    apply(h.execute, (), file)
  File "/usr/share/rhn/server/rhnSQL/sql_base.py", line 168, in execute
    return apply(self._execute_wrapper, (self._execute, ) + p, kw)
  File "/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py", line 119, in _execute_wrapper
    raise apply(sql_base.SQLError, ret)
SQLError: (6553, "ORA-06553: PLS-306: wrong number or types of arguments in call to 'LOOKUP_CONFIG_INFO'\n", 'select lookup_config_info(:username, :groupname, :file_mode) id from dual')

Comment 6 support 2009-09-04 15:10:24 UTC
Problem fixed: 

A fix was recently put in place, and now we just have to wait for the packages to be built/signed/etc.  The specific commit is here:

http://git.fedorahosted.org/git/spacewalk.git/?p=spacewalk.git;a=commitdiff;h=82c993afb4324e5702e69ba0cec35692c79c98ad

If you can't wait, edit this file:
/usr/share/rhn/server/configFilesHandler.py
and apply the first two hunks of the patch at line ~161 and ~324.

Comment 7 Milan Zázrivec 2010-02-05 12:52:59 UTC
rhncfg-5.9.18-1

Comment 8 Michael Mráka 2010-02-16 12:59:33 UTC
Spacewalk 0.8 has been released